[PATCH] D146737: [AMDGPU] Default component broadcast store

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 07:54:06 PDT 2023


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp:365
+
+  while (!isa<UndefValue>(FirstArg)) {
+    CurInst = dyn_cast<Instruction>(FirstArg);
----------------
matejam wrote:
> foad wrote:
> > I wonder if the whole of this loop could be replaced by calling llvm::computeKnownBits with an appropriate DemandedElts mask to test each element from the last to the first.
> I looked that up.
> computeKnownBits works only for integers, pointers and vector of integers.
You might be able to use the brand new computeKnownFPClass instead, and check if the result is exactly fcPosZero?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146737/new/

https://reviews.llvm.org/D146737



More information about the llvm-commits mailing list