brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 971e895 Raw
66 lines · plain
1# RUN: llc -mtriple=x86_64 -run-pass none -o - %s | FileCheck %s2# This test ensures that the MIR parser parses basic block liveins correctly.3 4--- |5 6  define i32 @test(i32 %a, i32 %b) {7  body:8    %c = add i32 %a, %b9    ret i32 %c10  }11 12  define i32 @test2(i32 %a, i32 %b) {13  body:14    %c = add i32 %a, %b15    ret i32 %c16  }17 18  define i32 @test3() {19  body:20    ret i32 021  }22 23...24---25name: test26tracksRegLiveness: true27body: |28  ; CHECK-LABEL: bb.0.body:29  ; CHECK-NEXT:    liveins: $edi, $esi30  bb.0.body:31    liveins: $edi, $esi32 33    $eax = LEA64_32r killed $rdi, 1, killed $rsi, 0, _34    RET64 $eax35...36---37name: test238tracksRegLiveness: true39body: |40  ; CHECK-LABEL: name: test241  ; Verify that we can have multiple lists of liveins that will be merged into42  ; one.43  ; CHECK:       bb.0.body:44  ; CHECK-NEXT:    liveins: $edi, $esi45  bb.0.body:46    liveins: $edi47    liveins: $esi48 49    $eax = LEA64_32r killed $rdi, 1, killed $rsi, 0, _50    RET64 $eax51...52---53name: test354tracksRegLiveness: true55body: |56  ; Verify that we can have an empty list of liveins.57  ; CHECK-LABEL: name: test358  ; CHECK:       bb.0.body:59  ; CHECK-NEXT:    $eax = MOV32r0 implicit-def dead $eflags60  bb.0.body:61    liveins:62 63    $eax = MOV32r0 implicit-def dead $eflags64    RET64 killed $eax65...66