[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 13:01: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;
----------------
changpeng wrote:

Thanks, Done in https://github.com/llvm/llvm-project/pull/115543

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


More information about the llvm-commits mailing list