[llvm] AMDGPU: Don't avoid clamp of bit shift in BFE pattern (PR #115372)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 8 01:20:35 PST 2024
================
@@ -3553,6 +3553,23 @@ def : AMDGPUPat <
(V_BFE_U32_e64 $src, (i32 0), $width)
>;
+def uint5Bits : PatLeaf<(i32 VGPR_32:$width), [{
+ return CurDAG->computeKnownBits(SDValue(N, 0)).countMaxTrailingOnes() <= 5;
----------------
jayfoad wrote:
No, this is completely wrong!!! E.g. if bit 0 is known to be 0 then `countMaxTrailingOnes` will return 0 and this test will pass.
https://github.com/llvm/llvm-project/pull/115372
More information about the llvm-commits
mailing list