Home | History | Annotate | Download | only in X86
      1 # RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
      2 # This test ensures that the MIR parser reports an error when an instruction
      3 # is missing one of its implicit register operands.
      4 
      5 --- |
      6 
      7   define i32 @foo(i32* %p) {
      8   entry:
      9     %a = load i32, i32* %p
     10     %0 = icmp sle i32 %a, 10
     11     br i1 %0, label %less, label %exit
     12 
     13   less:
     14     ret i32 0
     15 
     16   exit:
     17     ret i32 %a
     18   }
     19 
     20 
     21 ...
     22 ---
     23 name:            foo
     24 body: |
     25   bb.0.entry:
     26     successors: %bb.1.less, %bb.2.exit
     27 
     28     %eax = MOV32rm %rdi, 1, _, 0, _
     29     CMP32ri8 %eax, 10, implicit-def %eflags
     30   ; CHECK: [[@LINE+1]]:20: missing implicit register operand 'implicit %eflags'
     31     JG_1 %bb.2.exit
     32 
     33   bb.1.less:
     34     %eax = MOV32r0 implicit-def %eflags
     35 
     36   bb.2.exit:
     37     RETQ %eax
     38 ...
     39