[llvm] AMDGPU: Don't avoid clamp of bit shift in BFE pattern (PR #115372)
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 7 13:47:05 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)).countMinLeadingZeros() >= 27;
----------------
rampitec wrote:
`countMaxTrailingOnes() <= 5` would be easier to read.
https://github.com/llvm/llvm-project/pull/115372
More information about the llvm-commits
mailing list