@@ -4074,12 +4074,14 @@ define amdgpu_kernel void @v_test_v2i16_x_add_undef_neg32(ptr addrspace(1) %out,
40744074; VI-GISEL-NEXT: v_addc_u32_e32 v1, vcc, 0, v1, vcc
40754075; VI-GISEL-NEXT: flat_load_dword v3, v[0:1]
40764076; VI-GISEL-NEXT: v_mov_b32_e32 v0, s0
4077- ; VI-GISEL-NEXT: v_mov_b32_e32 v1, s1
40784077; VI-GISEL-NEXT: v_add_u32_e32 v0, vcc, v0, v2
40794078; VI-GISEL-NEXT: v_not_b32_e32 v2, 31
4079+ ; VI-GISEL-NEXT: v_mov_b32_e32 v1, s1
4080+ ; VI-GISEL-NEXT: s_and_b32 s0, 0xffff, s0
40804081; VI-GISEL-NEXT: v_addc_u32_e32 v1, vcc, 0, v1, vcc
40814082; VI-GISEL-NEXT: s_waitcnt vmcnt(0)
40824083; VI-GISEL-NEXT: v_add_u16_sdwa v2, v3, v2 dst_sel:WORD_1 dst_unused:UNUSED_PAD src0_sel:WORD_1 src1_sel:DWORD
4084+ ; VI-GISEL-NEXT: v_or_b32_e32 v2, s0, v2
40834085; VI-GISEL-NEXT: flat_store_dword v[0:1], v2
40844086; VI-GISEL-NEXT: s_endpgm
40854087;
@@ -4189,12 +4191,15 @@ define amdgpu_kernel void @v_test_v2i16_x_add_neg32_undef(ptr addrspace(1) %out,
41894191; VI-GISEL-NEXT: v_add_u32_e32 v0, vcc, v0, v2
41904192; VI-GISEL-NEXT: v_addc_u32_e32 v1, vcc, 0, v1, vcc
41914193; VI-GISEL-NEXT: flat_load_dword v3, v[0:1]
4194+ ; VI-GISEL-NEXT: s_and_b32 s2, 0xffff, s0
41924195; VI-GISEL-NEXT: v_mov_b32_e32 v0, s0
41934196; VI-GISEL-NEXT: v_mov_b32_e32 v1, s1
41944197; VI-GISEL-NEXT: v_add_u32_e32 v0, vcc, v0, v2
4198+ ; VI-GISEL-NEXT: s_lshl_b32 s0, s2, 16
41954199; VI-GISEL-NEXT: v_addc_u32_e32 v1, vcc, 0, v1, vcc
41964200; VI-GISEL-NEXT: s_waitcnt vmcnt(0)
41974201; VI-GISEL-NEXT: v_add_u16_e32 v2, 0xffe0, v3
4202+ ; VI-GISEL-NEXT: v_or_b32_e32 v2, s0, v2
41984203; VI-GISEL-NEXT: flat_store_dword v[0:1], v2
41994204; VI-GISEL-NEXT: s_endpgm
42004205;
0 commit comments