2
2
; RUN: llc < %s -mcpu=generic -mtriple=i386-apple-darwin -verify-machineinstrs -no-integrated-as | FileCheck %s
3
3
4
4
; There should be no stack manipulations between the inline asm and ret.
5
- define x86_fp80 @test1 () {
5
+ define x86_fp80 @test1 () nounwind {
6
6
; CHECK-LABEL: test1:
7
7
; CHECK: ## %bb.0:
8
8
; CHECK-NEXT: ## InlineAsm Start
@@ -13,7 +13,7 @@ define x86_fp80 @test1() {
13
13
ret x86_fp80 %tmp85
14
14
}
15
15
16
- define double @test2 () {
16
+ define double @test2 () nounwind {
17
17
; CHECK-LABEL: test2:
18
18
; CHECK: ## %bb.0:
19
19
; CHECK-NEXT: ## InlineAsm Start
@@ -26,7 +26,7 @@ define double @test2() {
26
26
27
27
; Setting up argument in st(0) should be a single fld.
28
28
; Asm consumes stack, nothing should be popped.
29
- define void @test3 (x86_fp80 %X ) {
29
+ define void @test3 (x86_fp80 %X ) nounwind {
30
30
; CHECK-LABEL: test3:
31
31
; CHECK: ## %bb.0:
32
32
; CHECK-NEXT: fldt {{[0-9]+}}(%esp)
@@ -38,7 +38,7 @@ define void @test3(x86_fp80 %X) {
38
38
ret void
39
39
}
40
40
41
- define void @test4 (double %X ) {
41
+ define void @test4 (double %X ) nounwind {
42
42
; CHECK-LABEL: test4:
43
43
; CHECK: ## %bb.0:
44
44
; CHECK-NEXT: fldl {{[0-9]+}}(%esp)
@@ -52,7 +52,7 @@ define void @test4(double %X) {
52
52
53
53
; Same as test3/4, but using value from fadd.
54
54
; The fadd can be done in xmm or x87 regs - we don't test that.
55
- define void @test5 (double %X ) {
55
+ define void @test5 (double %X ) nounwind {
56
56
; CHECK-LABEL: test5:
57
57
; CHECK: ## %bb.0:
58
58
; CHECK-NEXT: fldl {{[0-9]+}}(%esp)
@@ -110,7 +110,7 @@ entry:
110
110
; asm kills st(0), so we shouldn't pop anything
111
111
; A valid alternative would be to remat the constant pool load before each
112
112
; inline asm.
113
- define void @testPR4185 () {
113
+ define void @testPR4185 () nounwind {
114
114
; CHECK-LABEL: testPR4185:
115
115
; CHECK: ## %bb.0: ## %return
116
116
; CHECK-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
@@ -132,7 +132,7 @@ return:
132
132
; Make sure it is not duped before.
133
133
; Second asm kills st(0), so we shouldn't pop anything
134
134
; A valid alternative would be to remat the constant pool load before each inline asm.
135
- define void @testPR4185b () {
135
+ define void @testPR4185b () nounwind {
136
136
; CHECK-LABEL: testPR4185b:
137
137
; CHECK: ## %bb.0: ## %return
138
138
; CHECK-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
@@ -151,11 +151,10 @@ return:
151
151
152
152
; PR4459
153
153
; The return value from ceil must be duped before being consumed by asm.
154
- define void @testPR4459 (x86_fp80 %a ) {
154
+ define void @testPR4459 (x86_fp80 %a ) nounwind {
155
155
; CHECK-LABEL: testPR4459:
156
156
; CHECK: ## %bb.0: ## %entry
157
157
; CHECK-NEXT: subl $28, %esp
158
- ; CHECK-NEXT: .cfi_def_cfa_offset 32
159
158
; CHECK-NEXT: fldt {{[0-9]+}}(%esp)
160
159
; CHECK-NEXT: fstpt (%esp)
161
160
; CHECK-NEXT: calll _ceil
@@ -180,11 +179,10 @@ declare x86_fp80 @ceil(x86_fp80)
180
179
; test1 leaves a value on the stack that is needed after the asm.
181
180
; Load %a from stack after ceil
182
181
; Set up call to test.
183
- define void @testPR4484 (x86_fp80 %a ) {
182
+ define void @testPR4484 (x86_fp80 %a ) nounwind {
184
183
; CHECK-LABEL: testPR4484:
185
184
; CHECK: ## %bb.0: ## %entry
186
185
; CHECK-NEXT: subl $28, %esp
187
- ; CHECK-NEXT: .cfi_def_cfa_offset 32
188
186
; CHECK-NEXT: fldt {{[0-9]+}}(%esp)
189
187
; CHECK-NEXT: fstpt {{[-0-9]+}}(%e{{[sb]}}p) ## 10-byte Folded Spill
190
188
; CHECK-NEXT: calll _test1
@@ -204,7 +202,7 @@ entry:
204
202
}
205
203
206
204
; PR4485
207
- define void @testPR4485 (x86_fp80 * %a ) {
205
+ define void @testPR4485 (x86_fp80 * %a ) nounwind {
208
206
; CHECK-LABEL: testPR4485:
209
207
; CHECK: ## %bb.0: ## %entry
210
208
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -439,11 +437,10 @@ entry:
439
437
@fpu = external global %struct.fpu_t , align 16
440
438
441
439
; Function Attrs: ssp
442
- define void @test_live_st (i32 %a1 ) {
440
+ define void @test_live_st (i32 %a1 ) nounwind {
443
441
; CHECK-LABEL: test_live_st:
444
442
; CHECK: ## %bb.0: ## %entry
445
443
; CHECK-NEXT: subl $12, %esp
446
- ; CHECK-NEXT: .cfi_def_cfa_offset 16
447
444
; CHECK-NEXT: fldt (%eax)
448
445
; CHECK-NEXT: cmpl $1, {{[0-9]+}}(%esp)
449
446
; CHECK-NEXT: jne LBB20_2
@@ -491,7 +488,7 @@ return:
491
488
}
492
489
493
490
; Check that x87 stackifier is correctly rewriting FP registers to ST registers.
494
- define double @test_operand_rewrite () {
491
+ define double @test_operand_rewrite () nounwind {
495
492
; CHECK-LABEL: test_operand_rewrite:
496
493
; CHECK: ## %bb.0: ## %entry
497
494
; CHECK-NEXT: ## InlineAsm Start
0 commit comments