[PATCH] D154470: [AMDGPU] Fix ISD perm compute known bits wrong.

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 4 21:05:00 PDT 2023


bcl5980 created this revision.
bcl5980 added reviewers: foad, arsenm, rampitec.
Herald added subscribers: StephenFan, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
bcl5980 requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

SelBits can be 7.


https://reviews.llvm.org/D154470

Files:
  llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp


Index: llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
@@ -5016,7 +5016,7 @@
         SelBits *= 8;
         Known.One |= ((RHSKnown.One.getZExtValue() >> SelBits) & 0xff) << I;
         Known.Zero |= ((RHSKnown.Zero.getZExtValue() >> SelBits) & 0xff) << I;
-      } else if (SelBits < 7) {
+      } else if (SelBits < 8) {
         SelBits = (SelBits & 3) * 8;
         Known.One |= ((LHSKnown.One.getZExtValue() >> SelBits) & 0xff) << I;
         Known.Zero |= ((LHSKnown.Zero.getZExtValue() >> SelBits) & 0xff) << I;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154470.537208.patch
Type: text/x-patch
Size: 686 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230705/79206b2f/attachment.bin>


More information about the llvm-commits mailing list