[llvm] [AMDGPU] Add another SIFoldOperands instance after shrink (PR #67878)

Carl Ritson via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 30 22:33:02 PDT 2023


================
@@ -312,13 +312,13 @@ define <2 x i32> @v_srem_v2i32_pow2k_denom(<2 x i32> %num) {
 ; GISEL-NEXT:    v_sub_i32_e32 v0, vcc, v0, v4
 ; GISEL-NEXT:    v_sub_i32_e32 v1, vcc, v1, v3
 ; GISEL-NEXT:    v_subrev_i32_e32 v3, vcc, s4, v0
-; GISEL-NEXT:    v_subrev_i32_e32 v4, vcc, s4, v1
+; GISEL-NEXT:    v_subrev_i32_e32 v4, vcc, 0x1000, v1
----------------
perlfu wrote:

Why is the constant only folded into the second v_subrev, not both?

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


More information about the llvm-commits mailing list