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 stack objects correctly.
3
4--- |
5
6  define i32 @test(i32 %a) #0 {
7  entry:
8    %b = alloca i32
9    %x = alloca i64
10    store i32 %a, i32* %b
11    store i64 2, i64* %x
12    %c = load i32, i32* %b
13    ret i32 %c
14  }
15
16  attributes #0 = { "no-frame-pointer-elim"="false" }
17
18...
19---
20name:            test
21frameInfo:
22  maxAlignment:    8
23# CHECK: stack:
24# CHECK-NEXT: - { id: 0, offset: -12, size: 4, alignment: 4 }
25# CHECK-NEXT: - { id: 1, offset: -24, size: 8, alignment: 8 }
26# CHECK-NEXT: - { id: 2, type: spill-slot, offset: -32, size: 4, alignment: 4 }
27stack:
28  - { id: 0, offset: -12, size: 4, alignment: 4 }
29  - { id: 1, offset: -24, size: 8, alignment: 8 }
30  - { id: 2, type: spill-slot, offset: -32, size: 4, alignment: 4 }
31body:
32  - id:          0
33    name:        entry
34    instructions:
35      - 'MOV32mr %rsp, 1, _, -4, _, %edi'
36      - 'MOV64mi32 %rsp, 1, _, -16, _, 2'
37      - '%eax = MOV32rm %rsp, 1, _, -4, _'
38      - 'RETQ %eax'
39...
40