@@ -7,21 +7,18 @@ define amdgpu_kernel void @vgpr_mfma_pass_av_split_crash(double %arg1, i1 %arg2,
77; CHECK-NEXT: s_load_dword s0, s[4:5], 0x8
88; CHECK-NEXT: s_load_dwordx2 s[10:11], s[4:5], 0x0
99; CHECK-NEXT: s_load_dwordx4 s[12:15], s[4:5], 0x10
10- ; CHECK-NEXT: v_mov_b32_e32 v1, 0x3e21eeb6
11- ; CHECK-NEXT: v_mov_b32_e32 v20, 0
10+ ; CHECK-NEXT: v_mov_b32_e32 v30, 0x9037ab78
11+ ; CHECK-NEXT: v_mov_b32_e32 v31, 0x3e21eeb6
1212; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1313; CHECK-NEXT: s_bitcmp1_b32 s0, 0
1414; CHECK-NEXT: s_cselect_b64 s[16:17], -1, 0
1515; CHECK-NEXT: s_xor_b64 s[18:19], s[16:17], -1
1616; CHECK-NEXT: s_bitcmp1_b32 s0, 8
1717; CHECK-NEXT: s_cselect_b64 s[2:3], -1, 0
1818; CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[2:3]
19- ; CHECK-NEXT: v_cmp_ne_u32_e64 s[0:1], 1, v0
20- ; CHECK-NEXT: v_mov_b32_e32 v0, 0x9037ab78
21- ; CHECK-NEXT: v_accvgpr_write_b32 a3, v1
2219; CHECK-NEXT: s_xor_b64 s[20:21], s[2:3], -1
20+ ; CHECK-NEXT: v_cmp_ne_u32_e64 s[0:1], 1, v0
2321; CHECK-NEXT: s_and_b64 s[2:3], exec, s[2:3]
24- ; CHECK-NEXT: v_accvgpr_write_b32 a2, v0
2522; CHECK-NEXT: v_mov_b32_e32 v2, 0xa17f65f6
2623; CHECK-NEXT: v_mov_b32_e32 v3, 0xbe927e4f
2724; CHECK-NEXT: v_mov_b32_e32 v4, 0x19f4ec90
@@ -37,14 +34,15 @@ define amdgpu_kernel void @vgpr_mfma_pass_av_split_crash(double %arg1, i1 %arg2,
3734; CHECK-NEXT: v_mov_b32_e32 v14, 0x8427b883
3835; CHECK-NEXT: v_mov_b32_e32 v15, 0x3fae1bb4
3936; CHECK-NEXT: s_mov_b64 s[22:23], 0
40- ; CHECK-NEXT: v_mov_b32_e32 v0 , 0x57b87036
41- ; CHECK-NEXT: v_mov_b32_e32 v1 , 0x3fb3b136
37+ ; CHECK-NEXT: v_mov_b32_e32 v20 , 0x57b87036
38+ ; CHECK-NEXT: v_mov_b32_e32 v21 , 0x3fb3b136
4239; CHECK-NEXT: s_and_b64 s[4:5], exec, s[16:17]
4340; CHECK-NEXT: v_mov_b32_e32 v18, 0x55555523
4441; CHECK-NEXT: v_mov_b32_e32 v19, 0xbfd55555
4542; CHECK-NEXT: s_and_b64 s[6:7], exec, s[18:19]
46- ; CHECK-NEXT: v_mov_b32_e32 v21, v20
47- ; CHECK-NEXT: ; implicit-def: $vgpr30_vgpr31
43+ ; CHECK-NEXT: v_mov_b32_e32 v0, 0
44+ ; CHECK-NEXT: v_mov_b64_e32 v[16:17], 0
45+ ; CHECK-NEXT: ; implicit-def: $agpr0_agpr1
4846; CHECK-NEXT: ; implicit-def: $vgpr22_vgpr23
4947; CHECK-NEXT: s_branch .LBB0_2
5048; CHECK-NEXT: .LBB0_1: ; %Flow9
@@ -64,12 +62,11 @@ define amdgpu_kernel void @vgpr_mfma_pass_av_split_crash(double %arg1, i1 %arg2,
6462; CHECK-NEXT: ; in Loop: Header=BB0_2 Depth=1
6563; CHECK-NEXT: v_mov_b64_e32 v[24:25], s[14:15]
6664; CHECK-NEXT: flat_load_dwordx2 v[24:25], v[24:25]
67- ; CHECK-NEXT: v_accvgpr_read_b32 v27, a3
68- ; CHECK-NEXT: v_accvgpr_read_b32 v26, a2
65+ ; CHECK-NEXT: v_mov_b64_e32 v[26:27], v[30:31]
6966; CHECK-NEXT: v_mov_b64_e32 v[28:29], v[2:3]
70- ; CHECK-NEXT: v_mov_b64_e32 v[16:17], v[0:1 ]
71- ; CHECK-NEXT: v_accvgpr_write_b32 a0 , 0
72- ; CHECK-NEXT: v_accvgpr_write_b32 a1 , 0
67+ ; CHECK-NEXT: v_mov_b64_e32 v[16:17], v[20:21 ]
68+ ; CHECK-NEXT: v_accvgpr_write_b32 a2 , 0
69+ ; CHECK-NEXT: v_accvgpr_write_b32 a3 , 0
7370; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
7471; CHECK-NEXT: v_fmac_f64_e32 v[26:27], 0, v[24:25]
7572; CHECK-NEXT: v_fmac_f64_e32 v[28:29], 0, v[26:27]
@@ -96,30 +93,32 @@ define amdgpu_kernel void @vgpr_mfma_pass_av_split_crash(double %arg1, i1 %arg2,
9693; CHECK-NEXT: .LBB0_6: ; %.preheader1855.i.i.i3329
9794; CHECK-NEXT: ; Parent Loop BB0_2 Depth=1
9895; CHECK-NEXT: ; => This Inner Loop Header: Depth=2
99- ; CHECK-NEXT: v_accvgpr_read_b32 v29, a1
100- ; CHECK-NEXT: v_accvgpr_read_b32 v28, a0
96+ ; CHECK-NEXT: v_accvgpr_read_b32 v29, a3
97+ ; CHECK-NEXT: v_accvgpr_read_b32 v28, a2
10198; CHECK-NEXT: s_mov_b64 s[24:25], -1
10299; CHECK-NEXT: s_mov_b64 s[8:9], -1
103100; CHECK-NEXT: s_mov_b64 vcc, s[2:3]
104- ; CHECK-NEXT: ; implicit-def: $agpr0_agpr1
101+ ; CHECK-NEXT: ; implicit-def: $agpr2_agpr3
105102; CHECK-NEXT: s_cbranch_vccz .LBB0_5
106103; CHECK-NEXT: ; %bb.7: ; %.lr.ph2070.i.i.i3291
107104; CHECK-NEXT: ; in Loop: Header=BB0_6 Depth=2
108- ; CHECK-NEXT: v_accvgpr_write_b32 a0, v30
109- ; CHECK-NEXT: v_accvgpr_write_b32 a1, v31
105+ ; CHECK-NEXT: v_accvgpr_mov_b32 a3, a1
106+ ; CHECK-NEXT: v_accvgpr_mov_b32 a2, a0
110107; CHECK-NEXT: s_mov_b64 s[8:9], s[18:19]
111108; CHECK-NEXT: s_mov_b64 vcc, s[6:7]
112109; CHECK-NEXT: s_cbranch_vccz .LBB0_5
113110; CHECK-NEXT: ; %bb.8: ; %.preheader1856.preheader.i.i.i3325
114111; CHECK-NEXT: ; in Loop: Header=BB0_6 Depth=2
115- ; CHECK-NEXT: v_accvgpr_write_b32 a0 , v26
112+ ; CHECK-NEXT: v_accvgpr_write_b32 a2 , v26
116113; CHECK-NEXT: s_mov_b64 s[24:25], 0
117- ; CHECK-NEXT: v_accvgpr_write_b32 a1 , v27
114+ ; CHECK-NEXT: v_accvgpr_write_b32 a3 , v27
118115; CHECK-NEXT: s_mov_b64 s[8:9], 0
119116; CHECK-NEXT: s_branch .LBB0_5
120117; CHECK-NEXT: .LBB0_9: ; in Loop: Header=BB0_2 Depth=1
118+ ; CHECK-NEXT: v_mov_b64_e32 v[24:25], s[10:11]
119+ ; CHECK-NEXT: v_accvgpr_write_b32 a0, v24
121120; CHECK-NEXT: s_mov_b64 s[22:23], 0
122- ; CHECK-NEXT: v_mov_b64_e32 v[30:31], s[10:11]
121+ ; CHECK-NEXT: v_accvgpr_write_b32 a1, v25
123122; CHECK-NEXT: s_mov_b64 s[8:9], s[20:21]
124123; CHECK-NEXT: s_branch .LBB0_15
125124; CHECK-NEXT: .LBB0_10: ; in Loop: Header=BB0_2 Depth=1
@@ -136,19 +135,21 @@ define amdgpu_kernel void @vgpr_mfma_pass_av_split_crash(double %arg1, i1 %arg2,
136135; CHECK-NEXT: v_cndmask_b32_e64 v23, v23, 0, s[16:17]
137136; CHECK-NEXT: v_cndmask_b32_e64 v22, v22, 0, s[16:17]
138137; CHECK-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[8:9]
139- ; CHECK-NEXT: v_mov_b32_e32 v17, v16
140138; CHECK-NEXT: s_and_b64 s[8:9], exec, s[16:17]
141- ; CHECK-NEXT: global_store_dwordx2 v20, v[16:17], s[12:13]
139+ ; CHECK-NEXT: v_mov_b32_e32 v17, v16
142140; CHECK-NEXT: s_cselect_b32 s23, s23, 0
143141; CHECK-NEXT: s_cselect_b32 s22, s22, 0
144142; CHECK-NEXT: s_mov_b64 s[8:9], -1
143+ ; CHECK-NEXT: global_store_dwordx2 v0, v[16:17], s[12:13]
145144; CHECK-NEXT: s_branch .LBB0_14
146145; CHECK-NEXT: .LBB0_13: ; in Loop: Header=BB0_2 Depth=1
147146; CHECK-NEXT: s_mov_b64 s[8:9], 0
148147; CHECK-NEXT: v_mov_b64_e32 v[22:23], 0
149- ; CHECK-NEXT: .LBB0_14: ; %Flow6
148+ ; CHECK-NEXT: .LBB0_14: ; %Flow8
150149; CHECK-NEXT: ; in Loop: Header=BB0_2 Depth=1
151- ; CHECK-NEXT: v_mov_b64_e32 v[30:31], v[24:25]
150+ ; CHECK-NEXT: v_accvgpr_write_b32 a0, v24
151+ ; CHECK-NEXT: v_mov_b64_e32 v[16:17], 0
152+ ; CHECK-NEXT: v_accvgpr_write_b32 a1, v25
152153; CHECK-NEXT: .LBB0_15: ; %Flow6
153154; CHECK-NEXT: ; in Loop: Header=BB0_2 Depth=1
154155; CHECK-NEXT: s_mov_b64 s[24:25], -1
@@ -157,7 +158,7 @@ define amdgpu_kernel void @vgpr_mfma_pass_av_split_crash(double %arg1, i1 %arg2,
157158; CHECK-NEXT: ; %bb.16: ; %._crit_edge2105.i.i.i2330
158159; CHECK-NEXT: ; in Loop: Header=BB0_2 Depth=1
159160; CHECK-NEXT: s_mov_b64 s[24:25], 0
160- ; CHECK-NEXT: global_store_dwordx2 v20 , v[20:21 ], s[12:13]
161+ ; CHECK-NEXT: global_store_dwordx2 v0 , v[16:17 ], s[12:13]
161162; CHECK-NEXT: s_branch .LBB0_1
162163; CHECK-NEXT: .LBB0_17: ; %DummyReturnBlock
163164; CHECK-NEXT: s_endpgm
0 commit comments