llvm-project
d8016803 - [AMDGPU] Fold image load/store with known-zero slice index to non-arrayed form (#214744)

Commit
80 days ago
[AMDGPU] Fold image load/store with known-zero slice index to non-arrayed form (#214744) Fold an arrayed image load or store whose array slice is a known-zero constant into the equivalent non-arrayed op, dropping the slice coordinate. Slice 0 is the base layer, which is the texel the non-arrayed op addresses. Dropping the coordinate also removes the materialization of the zero, freeing a VGPR. Covers 1D_ARRAY -> 1D, 2D_ARRAY -> 2D and 2D_MSAA_ARRAY -> 2D_MSAA, keeping fragid for the MSAA case. The mapping is a new NonArrayDim field on MIMGDimInfo, defaulting to the dim itself so that CUBE, whose extra component is a face rather than a layer, is left alone.
Author
Parents
Loading