1# RUN: llc -march=x86-64 -run-pass none -o - %s | FileCheck %s 2# 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, %b 9 ret i32 %c 10 } 11 12 define i32 @test2(i32 %a, i32 %b) { 13 body: 14 %c = add i32 %a, %b 15 ret i32 %c 16 } 17 18 define i32 @test3() { 19 body: 20 ret i32 0 21 } 22 23... 24--- 25name: test 26tracksRegLiveness: true 27body: | 28 ; CHECK-LABEL: bb.0.body: 29 ; CHECK-NEXT: liveins: %edi, %esi 30 bb.0.body: 31 liveins: %edi, %esi 32 33 %eax = LEA64_32r killed %rdi, 1, killed %rsi, 0, _ 34 RETQ %eax 35... 36--- 37name: test2 38tracksRegLiveness: true 39body: | 40 ; CHECK-LABEL: name: test2 41 ; Verify that we can have multiple lists of liveins that will be merged into 42 ; one. 43 ; CHECK: bb.0.body: 44 ; CHECK-NEXT: liveins: %edi, %esi 45 bb.0.body: 46 liveins: %edi 47 liveins: %esi 48 49 %eax = LEA64_32r killed %rdi, 1, killed %rsi, 0, _ 50 RETQ %eax 51... 52--- 53name: test3 54tracksRegLiveness: true 55body: | 56 ; Verify that we can have an empty list of liveins. 57 ; CHECK-LABEL: name: test3 58 ; CHECK: bb.0.body: 59 ; CHECK-NEXT: %eax = MOV32r0 implicit-def dead %eflags 60 bb.0.body: 61 liveins: 62 63 %eax = MOV32r0 implicit-def dead %eflags 64 RETQ killed %eax 65... 66