1# RUN: llc -march=x86-64 -start-after machine-sink -stop-after machine-sink -o - %s | FileCheck %s
2# This test ensures that the MIR parser parses machine function's liveins
3# correctly.
4
5--- |
6
7  define i32 @test(i32 %a, i32 %b) {
8  body:
9    %c = add i32 %a, %b
10    ret i32 %c
11  }
12
13...
14---
15name:            test
16isSSA:           true
17tracksRegLiveness: true
18registers:
19  - { id: 0, class: gr32 }
20  - { id: 1, class: gr32 }
21  - { id: 2, class: gr32 }
22# CHECK: liveins:
23# CHECK-NEXT: - { reg: '%edi', virtual-reg: '%0' }
24# CHECK-NEXT: - { reg: '%esi', virtual-reg: '%1' }
25liveins:
26  - { reg: '%edi', virtual-reg: '%0' }
27  - { reg: '%esi', virtual-reg: '%1' }
28body: |
29  bb.0.body:
30    liveins: %edi, %esi
31
32    %1 = COPY %esi
33    %0 = COPY %edi
34    %2 = ADD32rr %0, %1, implicit-def dead %eflags
35    %eax = COPY %2
36    RETQ %eax
37...
38