1 # RUN: llc -march=x86-64 -run-pass none -o - %s | FileCheck %s
2 # This test ensures that the MIR parser parses the 'implicit' and 'implicit-def'
3 # register flags correctly.
7 define i32 @foo(i32 %a) {
9 %0 = icmp sle i32 %a, 10
10 br i1 %0, label %less, label %exit
19 define i1 @implicit_subregister1() {
24 define i16 @implicit_subregister2() {
34 successors: %bb.1, %bb.2
35 ; CHECK: CMP32ri8 $edi, 10, implicit-def $eflags
36 ; CHECK-NEXT: JCC_1 %bb.2, 15, implicit $eflags
37 CMP32ri8 $edi, 10, implicit-def $eflags
38 JCC_1 %bb.2, 15, implicit $eflags
41 ; CHECK: $eax = MOV32r0 implicit-def $eflags
42 $eax = MOV32r0 implicit-def $eflags
50 name: implicit_subregister1
53 ; Verify that the implicit register verifier won't report an error on implicit
55 ; CHECK-LABEL: name: implicit_subregister1
56 ; CHECK: dead $eax = XOR32rr undef $eax, undef $eax, implicit-def dead $eflags, implicit-def $al
57 dead $eax = XOR32rr undef $eax, undef $eax, implicit-def dead $eflags, implicit-def $al
61 name: implicit_subregister2
64 ; CHECK-LABEL: name: implicit_subregister2
65 ; CHECK: dead $r15 = XOR64rr undef $r15, undef $r15, implicit-def dead $eflags, implicit-def $r15w
66 dead $r15 = XOR64rr undef $r15, undef $r15, implicit-def dead $eflags, implicit-def $r15w