[llvm] [TargetLowering][AMDGPU][ARM][RISCV][X86] Teach SimplifyDemandedBits to combine (srl (sra X, C1), ShAmt) -> sra(X, C1+ShAmt) (PR #101751)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 4 23:07:03 PDT 2024
================
@@ -43,8 +43,8 @@ define i1 @test_srem_pow2_setne(i6 %X) nounwind {
; CHECK-LABEL: test_srem_pow2_setne:
; CHECK: ; %bb.0:
; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
-; CHECK-NEXT: v_bfe_i32 v1, v0, 0, 6
-; CHECK-NEXT: v_bfe_u32 v1, v1, 9, 2
+; CHECK-NEXT: v_bfe_i32 v1, v0, 5, 1
+; CHECK-NEXT: v_and_b32_e32 v1, 3, v1
----------------
arsenm wrote:
Small encoding size improvement
https://github.com/llvm/llvm-project/pull/101751
More information about the llvm-commits
mailing list