[PATCH] D32036: AMDGPU: SimplifyDemandedElts for image intrinsics

Marek Olšák via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 13 12:46:03 PDT 2017


mareko added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:1762
+
+          NewCall->setArgOperand(3, ConstantInt::get(DMask->getType(), NewDMask));
+        }
----------------
Gather4 opcodes always return 4 VGPRs and DMASK has a different meaning. Specifically, Gather4 reads 4 texels from memory and DMASK selects which color component is returned for the texels (i.e. 4x red channel, or 4x green channel, etc.) So DMASK shouldn't be changed by the compiler for gather4 opcodes.


https://reviews.llvm.org/D32036





More information about the llvm-commits mailing list