brintos

brintos / llvm-project-archived public Read only

0
0
Text · 787 B · 39e88fe Raw
41 lines · plain
1# RUN: llc -mtriple=x86_64 -run-pass none -o - %s | FileCheck %s2# This test ensures that the MIR parser parses the 'killed' register flags3# correctly.4 5--- |6 7  define i32 @foo(i32 %a) {8  entry:9    %0 = icmp sle i32 %a, 1010    br i1 %0, label %less, label %exit11 12  less:13    ret i32 014 15  exit:16    ret i32 %a17  }18 19...20---21name:            foo22body: |23  bb.0.entry:24    successors: %bb.1.less, %bb.2.exit25 26    CMP32ri8 $edi, 10, implicit-def $eflags27    JCC_1 %bb.2.exit, 15, implicit $eflags28 29  bb.1.less:30    ; CHECK:      $eax = MOV32r031    ; CHECK-NEXT: RET64 killed $eax32    $eax = MOV32r0 implicit-def $eflags33    RET64 killed $eax34 35  bb.2.exit:36    ; CHECK:      $eax = COPY killed $edi37    ; CHECK-NEXT: RET64 killed $eax38    $eax = COPY killed $edi39    RET64 killed $eax40...41