[llvm] AMDGPU: Disable pattern matching from x&(-1>>(32-y) to "bfe x, 0, y" (PR #116115)
Changpeng Fang via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 15:18:10 PST 2024
================
@@ -99,11 +99,21 @@ define i32 @bzhi32_b4_commutative(i32 %val, i32 %numlowbits) nounwind {
; ---------------------------------------------------------------------------- ;
define i32 @bzhi32_c0(i32 %val, i32 %numlowbits) nounwind {
-; GCN-LABEL: bzhi32_c0:
-; GCN: ; %bb.0:
-; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
-; GCN-NEXT: v_bfe_u32 v0, v0, 0, v1
-; GCN-NEXT: s_setpc_b64 s[30:31]
+; SI-LABEL: bzhi32_c0:
----------------
changpeng wrote:
> Run it through instcombine. Whatever it produces is canonical. and computeKnownBits as you did before
Running instcombine like this?
./opt -passes=instcombine canon.ll -S
https://github.com/llvm/llvm-project/pull/116115
More information about the llvm-commits
mailing list