1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=x86_64-- -verify-machineinstrs -o - %s -run-pass=livevars,phi-node-elimination,twoaddressinstruction | FileCheck %s
3 # RUN: llc -mtriple=x86_64-- -verify-machineinstrs -o - %s --passes='require<live-vars>,phi-node-elimination,two-address-instruction' | FileCheck %s
6 @b114 = external global i16, align 1
15 tracksRegLiveness: true
17 ; CHECK-LABEL: name: f245
19 ; CHECK-NEXT: successors: %bb.5(0x40000000), %bb.1(0x40000000)
21 ; CHECK-NEXT: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @b114, $noreg
22 ; CHECK-NEXT: [[MOV16rm:%[0-9]+]]:gr16 = MOV16rm killed [[MOV64rm]], 1, $noreg, 0, $noreg :: (load (s16) from @b114, align 1)
23 ; CHECK-NEXT: TEST8ri undef %2:gr8, 1, implicit-def $eflags
24 ; CHECK-NEXT: JCC_1 %bb.5, 5, implicit killed $eflags
27 ; CHECK-NEXT: successors: %bb.2(0x80000000)
29 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gr16 = COPY killed [[MOV16rm]]
30 ; CHECK-NEXT: JMP_1 %bb.2
33 ; CHECK-NEXT: successors: %bb.4(0x40000000), %bb.3(0x40000000)
35 ; CHECK-NEXT: dead %5:gr16 = IMPLICIT_DEF
36 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gr16 = COPY killed [[COPY]]
37 ; CHECK-NEXT: TEST8ri undef %7:gr8, 1, implicit-def $eflags
38 ; CHECK-NEXT: JCC_1 %bb.4, 5, implicit killed $eflags
39 ; CHECK-NEXT: JMP_1 %bb.3
42 ; CHECK-NEXT: successors: %bb.6(0x40000000), %bb.4(0x40000000)
44 ; CHECK-NEXT: [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
45 ; CHECK-NEXT: dead %9:gr16 = COPY killed [[MOV32r0_]].sub_16bit
46 ; CHECK-NEXT: CMP16ri8 killed [[COPY1]], 0, implicit-def $eflags
47 ; CHECK-NEXT: JCC_1 %bb.6, 5, implicit killed $eflags
50 ; CHECK-NEXT: successors: %bb.2(0x80000000)
52 ; CHECK-NEXT: [[DEF:%[0-9]+]]:gr16 = IMPLICIT_DEF
53 ; CHECK-NEXT: JMP_1 %bb.2
60 successors: %bb.6(0x40000000), %bb.1(0x40000000)
62 %5:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @b114, $noreg
63 %6:gr16 = MOV16rm killed %5, 1, $noreg, 0, $noreg :: (load (s16) from @b114, align 1)
64 TEST8ri undef %4:gr8, 1, implicit-def $eflags
65 JCC_1 %bb.6, 5, implicit killed $eflags
68 successors: %bb.2(0x80000000)
73 successors: %bb.5(0x40000000), %bb.4(0x40000000)
75 %1:gr16 = PHI %6, %bb.1, undef %10:gr16, %bb.5
76 dead %2:gr16 = PHI undef %6, %bb.1, undef %3:gr16, %bb.5
77 TEST8ri undef %7:gr8, 1, implicit-def $eflags
78 JCC_1 %bb.5, 5, implicit killed $eflags
82 successors: %bb.7(0x40000000), %bb.5(0x40000000)
84 %8:gr32 = MOV32r0 implicit-def dead $eflags
85 %9:gr16 = COPY killed %8.sub_16bit
86 CMP16ri8 killed %1, 0, implicit-def $eflags
87 JCC_1 %bb.7, 5, implicit killed $eflags
90 successors: %bb.2(0x80000000)