1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=register-coalescer -o - %s | FileCheck %s
4 # Check that we get two move-immediates into %1 and %2, instead of a copy from
5 # %1 to %2, because that would introduce a dependency and maybe a stall.
8 tracksRegLiveness: true
10 ; CHECK-LABEL: name: f
12 ; CHECK-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)
13 ; CHECK-NEXT: liveins: $sgpr0
15 ; CHECK-NEXT: undef %4.sub0:vreg_96 = V_MOV_B32_e32 0, implicit $exec
16 ; CHECK-NEXT: %4.sub1:vreg_96 = V_MOV_B32_e32 0, implicit $exec
17 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0
18 ; CHECK-NEXT: $exec = S_MOV_B64_term [[COPY]]
19 ; CHECK-NEXT: S_CBRANCH_EXECZ %bb.2, implicit $exec
20 ; CHECK-NEXT: S_BRANCH %bb.1
23 ; CHECK-NEXT: successors: %bb.2(0x80000000)
25 ; CHECK-NEXT: %4.sub0:vreg_96 = V_MUL_F32_e32 %4.sub0, %4.sub0, implicit $mode, implicit $exec
26 ; CHECK-NEXT: %4.sub1:vreg_96 = V_MUL_F32_e32 %4.sub1, %4.sub1, implicit $mode, implicit $exec
29 ; CHECK-NEXT: S_ENDPGM 0, implicit %4
32 %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
33 %1:vgpr_32 = COPY %0:vgpr_32
34 %2:vgpr_32 = COPY %0:vgpr_32
35 %3:sreg_64 = COPY $sgpr0
36 $exec = S_MOV_B64_term %3:sreg_64
37 S_CBRANCH_EXECZ %bb.2, implicit $exec
41 %1:vgpr_32 = V_MUL_F32_e32 %1:vgpr_32, %1:vgpr_32, implicit $mode, implicit $exec
42 %2:vgpr_32 = V_MUL_F32_e32 %2:vgpr_32, %2:vgpr_32, implicit $mode, implicit $exec
45 undef %4.sub0:vreg_96 = COPY %1:vgpr_32
46 %4.sub1:vreg_96 = COPY %2:vgpr_32
47 S_ENDPGM 0, implicit %4