1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=x86_64-grtev4-linux-gnu -run-pass=regallocfast -o - %s | FileCheck %s
4 # Bug 41973. Make sure %12 is detected as live out of %bb.0, even
5 # though the use is allocated before the def block %bb.3. Previously
6 # mayLiveOut only recorded on defs, and would not find the virtual
7 # register use if it had already been replace with a physical
12 tracksRegLiveness: true
14 ; CHECK-LABEL: name: main
16 ; CHECK: successors: %bb.3(0x80000000)
17 ; CHECK: liveins: $edi, $rsi
18 ; CHECK: MOV64mr %stack.0, 1, $noreg, 0, $noreg, killed $rsi :: (store 8 into %stack.0)
23 ; CHECK: successors: %bb.3(0x80000000)
24 ; CHECK: $rax = MOV64rm %stack.1, 1, $noreg, 0, $noreg :: (load 8 from %stack.1)
25 ; CHECK: renamable $ecx = MOV32r0 implicit-def $eflags
26 ; CHECK: renamable $rdx = SUBREG_TO_REG 0, killed renamable $ecx, %subreg.sub_32bit
27 ; CHECK: MOV64mi32 killed renamable $rax, 1, $noreg, 0, $noreg, 0 :: (volatile store 8)
28 ; CHECK: MOV64mr %stack.0, 1, $noreg, 0, $noreg, killed $rdx :: (store 8 into %stack.0)
30 ; CHECK: successors: %bb.2(0x40000000), %bb.1(0x40000000)
31 ; CHECK: $rax = MOV64rm %stack.0, 1, $noreg, 0, $noreg :: (load 8 from %stack.0)
32 ; CHECK: renamable $ecx = MOV32r0 implicit-def dead $eflags
33 ; CHECK: renamable $rdx = SUBREG_TO_REG 0, killed renamable $ecx, %subreg.sub_32bit
34 ; CHECK: MOV64mr %stack.1, 1, $noreg, 0, $noreg, killed $rdx :: (store 8 into %stack.1)
35 ; CHECK: JMP64r killed renamable $rax
41 %3:gr32 = COPY killed %2
42 %5:gr64 = COPY killed %4
52 %10:gr32 = MOV32r0 implicit-def $eflags
53 %11:gr64 = SUBREG_TO_REG 0, %10, %subreg.sub_32bit
54 MOV64mi32 %0, 1, $noreg, 0, $noreg, 0 :: (volatile store 8)
58 successors: %bb.2, %bb.1
61 %9:gr32 = MOV32r0 implicit-def dead $eflags
62 %8:gr64 = SUBREG_TO_REG 0, killed %9, %subreg.sub_32bit