MIR Parser: Report an error when a fixed stack object is redefined.
[oota-llvm.git] / test / CodeGen / MIR / X86 / function-liveins.mir
1 # RUN: llc -march=x86-64 -start-after machine-sink -stop-after machine-sink -o /dev/null %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 ---
15 name:            test
16 isSSA:           true
17 tracksRegLiveness: true
18 registers:
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' }
25 liveins:
26   - { reg: '%edi', virtual-reg: '%0' }
27   - { reg: '%esi', virtual-reg: '%1' }
28 body:
29   - id:              0
30     name:            body
31     liveins:         [ '%edi', '%esi' ]
32     instructions:
33       - '%1 = COPY %esi'
34       - '%0 = COPY %edi'
35       - '%2 = ADD32rr %0, %1, implicit-def dead %eflags'
36       - '%eax = COPY %2'
37       - 'RETQ %eax'
38 ...