• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -run-pass none -o - %s | FileCheck %s
2# This test ensures that the MIR parser parses machine frame info properties
3# correctly.
4
5--- |
6
7  define i32 @test(i32 %a) {
8  entry:
9    %b = alloca i32
10    store i32 %a, i32* %b
11    %c = load i32, i32* %b
12    ret i32 %c
13  }
14
15  define i32 @test2(i32 %a) {
16  entry:
17    %b = alloca i32
18    store i32 %a, i32* %b
19    %c = load i32, i32* %b
20    ret i32 %c
21  }
22
23...
24---
25name:            test
26tracksRegLiveness: true
27
28# CHECK: frameInfo:
29# CHECK-NEXT: isFrameAddressTaken: false
30# CHECK-NEXT: isReturnAddressTaken: false
31# CHECK-NEXT: hasStackMap: false
32# CHECK-NEXT: hasPatchPoint: false
33# CHECK-NEXT: stackSize: 0
34# CHECK-NEXT: offsetAdjustment: 0
35# Note: max alignment can be target specific when printed.
36# CHECK-NEXT: maxAlignment:
37# CHECK-NEXT: adjustsStack: false
38# CHECK-NEXT: hasCalls: false
39# CHECK-NEXT: stackProtector:  ''
40# CHECK-NEXT: maxCallFrameSize:
41# CHECK-NEXT: cvBytesOfCalleeSavedRegisters: 0
42# CHECK-NEXT: hasOpaqueSPAdjustment: false
43# CHECK-NEXT: hasVAStart: false
44# CHECK-NEXT: hasMustTailInVarArgFunc: false
45# CHECK-NEXT: localFrameSize: 0
46# CHECK-NEXT: savePoint:       ''
47# CHECK-NEXT: restorePoint:    ''
48# CHECK: body
49frameInfo:
50  maxAlignment:    4
51body: |
52  bb.0.entry:
53...
54---
55name:            test2
56tracksRegLiveness: true
57
58# CHECK: test2
59# CHECK: frameInfo:
60# CHECK-NEXT: isFrameAddressTaken: true
61# CHECK-NEXT: isReturnAddressTaken: true
62# CHECK-NEXT: hasStackMap: true
63# CHECK-NEXT: hasPatchPoint: true
64# CHECK-NEXT: stackSize: 4
65# CHECK-NEXT: offsetAdjustment: 4
66# Note: max alignment can be target specific when printed.
67# CHECK-NEXT: maxAlignment:
68# CHECK-NEXT: adjustsStack: true
69# CHECK-NEXT: hasCalls: true
70# CHECK-NEXT: stackProtector:  ''
71# CHECK-NEXT: maxCallFrameSize: 4
72# CHECK-NEXT: cvBytesOfCalleeSavedRegisters: 8
73# CHECK-NEXT: hasOpaqueSPAdjustment: true
74# CHECK-NEXT: hasVAStart: true
75# CHECK-NEXT: hasMustTailInVarArgFunc: true
76# CHECK: body
77frameInfo:
78  isFrameAddressTaken: true
79  isReturnAddressTaken: true
80  hasStackMap:     true
81  hasPatchPoint:   true
82  stackSize:       4
83  offsetAdjustment: 4
84  maxAlignment:    4
85  adjustsStack:    true
86  hasCalls:        true
87  maxCallFrameSize: 4
88  cvBytesOfCalleeSavedRegisters: 8
89  hasOpaqueSPAdjustment: true
90  hasVAStart:      true
91  hasMustTailInVarArgFunc: true
92  localFrameSize: 256
93body: |
94  bb.0.entry:
95...
96
97