1 # REQUIRES: amdgpu-registered-target
2 # RUN: llvm-reduce -abort-on-invalid-reduction -simplify-mir --delta-passes=register-uses -mtriple=amdgcn-amd-amdhsa --test FileCheck --test-arg --check-prefix=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2> %t.log
3 # RUN: FileCheck --match-full-lines --check-prefix=RESULT %s < %t
5 # CHECK-INTERESTINGNESS: V_MUL_F32_e32 %vgpr0
6 # CHECK-INTERESTINGNESS: V_MUL_F32_e32 {{.*}}%vgpr1, %vgpr0
8 # CHECK-INTERESTINGNESS: SI_CALL {{.*}}$vgpr0
9 # CHECK-INTERESTINGNESS: SI_CALL {{.*}}$vgpr3
12 # RESULT: %mul0:vgpr_32 = V_MUL_F32_e32 %vgpr0, undef %vgpr1, implicit $mode, implicit $exec
13 # RESULT: %mul1:vgpr_32 = V_MUL_F32_e32 undef %vgpr1, %vgpr0, implicit $mode, implicit $exec
14 # RESULT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
15 # RESULT: $vgpr1 = V_MOV_B32_e32 1, implicit $exec
16 # RESULT: $sgpr30_sgpr31 = SI_CALL undef %call_target, @callee, csr_amdgpu, implicit $vgpr0
17 # RESULT: $sgpr30_sgpr31 = SI_CALL undef %call_target, @callee, csr_amdgpu, implicit $vgpr3
18 # RESULT: %impdef:vreg_64 = IMPLICIT_DEF
19 # RESULT: GLOBAL_STORE_DWORD undef %ptr, undef %impdef.sub1, 0, 0, implicit $exec
20 # RESULT: undef %impdef.sub0:vreg_64 = V_MOV_B32_e32 0, implicit $exec
21 # RESULT: S_CBRANCH_SCC1 %bb.1, implicit undef $scc
30 declare void @callee()
35 tracksRegLiveness: true
38 liveins: $vgpr0, $vgpr1
41 %vgpr0:vgpr_32 = COPY $vgpr0
42 %vgpr1:vgpr_32 = COPY $vgpr1
43 %mul0:vgpr_32 = V_MUL_F32_e32 %vgpr0, %vgpr1, implicit $mode, implicit $exec
44 %mul1:vgpr_32 = V_MUL_F32_e32 %vgpr1, %vgpr0, implicit $mode, implicit $exec
45 %call_target:sreg_64 = IMPLICIT_DEF
46 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
47 $vgpr1 = V_MOV_B32_e32 1, implicit $exec
48 $sgpr30_sgpr31 = SI_CALL %call_target, @callee, csr_amdgpu, implicit $vgpr0, implicit $vgpr1
49 $vgpr2 = V_MOV_B32_e32 2, implicit $exec
50 $vgpr3 = V_MOV_B32_e32 3, implicit $exec
51 $sgpr30_sgpr31 = SI_CALL %call_target, @callee, csr_amdgpu, implicit $vgpr2, implicit $vgpr3
52 %impdef:vreg_64 = IMPLICIT_DEF
53 %ptr:vreg_64 = IMPLICIT_DEF
54 GLOBAL_STORE_DWORD %ptr, %impdef.sub1, 0, 0, implicit $exec
55 %impdef.sub0 = V_MOV_B32_e32 0, implicit $exec
57 S_CBRANCH_SCC1 %bb.1, implicit $scc
61 S_ENDPGM 0, implicit %mul0, implicit %mul1