MIR Parser: Report an error when a virtual register is redefined.
[oota-llvm.git] / test / CodeGen / MIR / X86 / fixed-stack-objects.mir
1 # RUN: llc -march=x86 -start-after branch-folder -stop-after branch-folder -o /dev/null %s | FileCheck %s
2 # This test ensures that the MIR parser parses fixed stack objects correctly.
3
4 --- |
5
6   define i32 @test(i32 %a) #0 {
7   entry:
8     %b = alloca i32
9     store i32 %a, i32* %b
10     %c = load i32, i32* %b
11     ret i32 %c
12   }
13
14   attributes #0 = { "no-frame-pointer-elim"="false" }
15
16 ...
17 ---
18 name:            test
19 frameInfo:
20   stackSize:       4
21   maxAlignment:    4
22 # CHECK: fixedStack:
23 # CHECK-NEXT: - { id: 0, offset: 0, size: 4, alignment: 4, isImmutable: true, isAliased: false }
24 fixedStack:
25   - { id: 0, offset: 0, size: 4, alignment: 4, isImmutable: true, isAliased: false }
26 stack:
27   - { id: 0, offset: -8, size: 4, alignment: 4 }
28 body:
29   - id:          0
30     name:        entry
31     instructions:
32       - '%eax = MOV32rm %esp, 1, _, 8, _'
33       - 'MOV32mr %esp, 1, _, 0, _, %eax'
34       - 'RETL %eax'
35 ...