[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
Thu Nov 7 14:15:14 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;
----------------
changpeng wrote:

Done. Thanks.

https://github.com/llvm/llvm-project/pull/115372


More information about the llvm-commits mailing list