1# RUN: llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %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 26body: | 27 ; CHECK-LABEL: bb.0.body: 28 ; CHECK-NEXT: liveins: %edi, %esi 29 bb.0.body: 30 liveins: %edi, %esi 31 32 %eax = LEA64_32r killed %rdi, 1, killed %rsi, 0, _ 33 RETQ %eax 34... 35--- 36name: test2 37body: | 38 ; CHECK-LABEL: name: test2 39 ; Verify that we can have multiple lists of liveins that will be merged into 40 ; one. 41 ; CHECK: bb.0.body: 42 ; CHECK-NEXT: liveins: %edi, %esi 43 bb.0.body: 44 liveins: %edi 45 liveins: %esi 46 47 %eax = LEA64_32r killed %rdi, 1, killed %rsi, 0, _ 48 RETQ %eax 49... 50--- 51name: test3 52body: | 53 ; Verify that we can have an empty list of liveins. 54 ; CHECK-LABEL: name: test3 55 ; CHECK: bb.0.body: 56 ; CHECK-NEXT: %eax = MOV32r0 implicit-def dead %eflags 57 bb.0.body: 58 liveins: 59 60 %eax = MOV32r0 implicit-def dead %eflags 61 RETQ killed %eax 62... 63