• 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: hasOpaqueSPAdjustment: false
42# CHECK-NEXT: hasVAStart: false
43# CHECK-NEXT: hasMustTailInVarArgFunc: false
44# CHECK-NEXT: localFrameSize: 0
45# CHECK-NEXT: savePoint:       ''
46# CHECK-NEXT: restorePoint:    ''
47# CHECK: body
48frameInfo:
49  maxAlignment:    4
50body: |
51  bb.0.entry:
52...
53---
54name:            test2
55tracksRegLiveness: true
56
57# CHECK: test2
58# CHECK: frameInfo:
59# CHECK-NEXT: isFrameAddressTaken: true
60# CHECK-NEXT: isReturnAddressTaken: true
61# CHECK-NEXT: hasStackMap: true
62# CHECK-NEXT: hasPatchPoint: true
63# CHECK-NEXT: stackSize: 4
64# CHECK-NEXT: offsetAdjustment: 4
65# Note: max alignment can be target specific when printed.
66# CHECK-NEXT: maxAlignment:
67# CHECK-NEXT: adjustsStack: true
68# CHECK-NEXT: hasCalls: true
69# CHECK-NEXT: stackProtector:  ''
70# CHECK-NEXT: maxCallFrameSize: 4
71# CHECK-NEXT: hasOpaqueSPAdjustment: true
72# CHECK-NEXT: hasVAStart: true
73# CHECK-NEXT: hasMustTailInVarArgFunc: true
74# CHECK: body
75frameInfo:
76  isFrameAddressTaken: true
77  isReturnAddressTaken: true
78  hasStackMap:     true
79  hasPatchPoint:   true
80  stackSize:       4
81  offsetAdjustment: 4
82  maxAlignment:    4
83  adjustsStack:    true
84  hasCalls:        true
85  maxCallFrameSize: 4
86  hasOpaqueSPAdjustment: true
87  hasVAStart:      true
88  hasMustTailInVarArgFunc: true
89  localFrameSize: 256
90body: |
91  bb.0.entry:
92...
93
94