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
5 @b114 = external global i16, align 1
14 tracksRegLiveness: true
16 ; CHECK-LABEL: name: f245
18 ; CHECK-NEXT: successors: %bb.5(0x40000000), %bb.1(0x40000000)
20 ; CHECK-NEXT: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @b114, $noreg
21 ; CHECK-NEXT: [[MOV16rm:%[0-9]+]]:gr16 = MOV16rm killed [[MOV64rm]], 1, $noreg, 0, $noreg :: (load (s16) from @b114, align 1)
22 ; CHECK-NEXT: TEST8ri undef %2:gr8, 1, implicit-def $eflags
23 ; CHECK-NEXT: JCC_1 %bb.5, 5, implicit killed $eflags
26 ; CHECK-NEXT: successors: %bb.2(0x80000000)
28 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gr16 = COPY killed [[MOV16rm]]
29 ; CHECK-NEXT: JMP_1 %bb.2
32 ; CHECK-NEXT: successors: %bb.4(0x40000000), %bb.3(0x40000000)
34 ; CHECK-NEXT: dead %5:gr16 = IMPLICIT_DEF
35 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gr16 = COPY killed [[COPY]]
36 ; CHECK-NEXT: TEST8ri undef %7:gr8, 1, implicit-def $eflags
37 ; CHECK-NEXT: JCC_1 %bb.4, 5, implicit killed $eflags
38 ; CHECK-NEXT: JMP_1 %bb.3
41 ; CHECK-NEXT: successors: %bb.6(0x40000000), %bb.4(0x40000000)
43 ; CHECK-NEXT: [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
44 ; CHECK-NEXT: dead %9:gr16 = COPY killed [[MOV32r0_]].sub_16bit
45 ; CHECK-NEXT: CMP16ri8 killed [[COPY1]], 0, implicit-def $eflags
46 ; CHECK-NEXT: JCC_1 %bb.6, 5, implicit killed $eflags
49 ; CHECK-NEXT: successors: %bb.2(0x80000000)
51 ; CHECK-NEXT: [[DEF:%[0-9]+]]:gr16 = IMPLICIT_DEF
52 ; CHECK-NEXT: JMP_1 %bb.2
59 successors: %bb.6(0x40000000), %bb.1(0x40000000)
61 %5:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @b114, $noreg
62 %6:gr16 = MOV16rm killed %5, 1, $noreg, 0, $noreg :: (load (s16) from @b114, align 1)
63 TEST8ri undef %4:gr8, 1, implicit-def $eflags
64 JCC_1 %bb.6, 5, implicit killed $eflags
67 successors: %bb.2(0x80000000)
72 successors: %bb.5(0x40000000), %bb.4(0x40000000)
74 %1:gr16 = PHI %6, %bb.1, undef %10:gr16, %bb.5
75 dead %2:gr16 = PHI undef %6, %bb.1, undef %3:gr16, %bb.5
76 TEST8ri undef %7:gr8, 1, implicit-def $eflags
77 JCC_1 %bb.5, 5, implicit killed $eflags
81 successors: %bb.7(0x40000000), %bb.5(0x40000000)
83 %8:gr32 = MOV32r0 implicit-def dead $eflags
84 %9:gr16 = COPY killed %8.sub_16bit
85 CMP16ri8 killed %1, 0, implicit-def $eflags
86 JCC_1 %bb.7, 5, implicit killed $eflags
89 successors: %bb.2(0x80000000)