[llvm] AMDGPU: Don't avoid clamp of bit shift in BFE pattern (PR #115372)
Changpeng Fang via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 8 10:18:51 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;
----------------
changpeng wrote:
Thanks so much. Also countMaxActiveBits is more close to what we are going to define
https://github.com/llvm/llvm-project/pull/115372
More information about the llvm-commits
mailing list