Skip to content

Commit 4721ee7

Browse files
committed
Add nounwind for tests. NFC
1 parent 7d668ae commit 4721ee7

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

llvm/test/CodeGen/X86/inline-asm-fpstack.ll

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; RUN: llc < %s -mcpu=generic -mtriple=i386-apple-darwin -verify-machineinstrs -no-integrated-as | FileCheck %s
33

44
; There should be no stack manipulations between the inline asm and ret.
5-
define x86_fp80 @test1() {
5+
define x86_fp80 @test1() nounwind {
66
; CHECK-LABEL: test1:
77
; CHECK: ## %bb.0:
88
; CHECK-NEXT: ## InlineAsm Start
@@ -13,7 +13,7 @@ define x86_fp80 @test1() {
1313
ret x86_fp80 %tmp85
1414
}
1515

16-
define double @test2() {
16+
define double @test2() nounwind {
1717
; CHECK-LABEL: test2:
1818
; CHECK: ## %bb.0:
1919
; CHECK-NEXT: ## InlineAsm Start
@@ -26,7 +26,7 @@ define double @test2() {
2626

2727
; Setting up argument in st(0) should be a single fld.
2828
; Asm consumes stack, nothing should be popped.
29-
define void @test3(x86_fp80 %X) {
29+
define void @test3(x86_fp80 %X) nounwind {
3030
; CHECK-LABEL: test3:
3131
; CHECK: ## %bb.0:
3232
; CHECK-NEXT: fldt {{[0-9]+}}(%esp)
@@ -38,7 +38,7 @@ define void @test3(x86_fp80 %X) {
3838
ret void
3939
}
4040

41-
define void @test4(double %X) {
41+
define void @test4(double %X) nounwind {
4242
; CHECK-LABEL: test4:
4343
; CHECK: ## %bb.0:
4444
; CHECK-NEXT: fldl {{[0-9]+}}(%esp)
@@ -52,7 +52,7 @@ define void @test4(double %X) {
5252

5353
; Same as test3/4, but using value from fadd.
5454
; 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 {
5656
; CHECK-LABEL: test5:
5757
; CHECK: ## %bb.0:
5858
; CHECK-NEXT: fldl {{[0-9]+}}(%esp)
@@ -110,7 +110,7 @@ entry:
110110
; asm kills st(0), so we shouldn't pop anything
111111
; A valid alternative would be to remat the constant pool load before each
112112
; inline asm.
113-
define void @testPR4185() {
113+
define void @testPR4185() nounwind {
114114
; CHECK-LABEL: testPR4185:
115115
; CHECK: ## %bb.0: ## %return
116116
; CHECK-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
@@ -132,7 +132,7 @@ return:
132132
; Make sure it is not duped before.
133133
; Second asm kills st(0), so we shouldn't pop anything
134134
; A valid alternative would be to remat the constant pool load before each inline asm.
135-
define void @testPR4185b() {
135+
define void @testPR4185b() nounwind {
136136
; CHECK-LABEL: testPR4185b:
137137
; CHECK: ## %bb.0: ## %return
138138
; CHECK-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
@@ -151,11 +151,10 @@ return:
151151

152152
; PR4459
153153
; 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 {
155155
; CHECK-LABEL: testPR4459:
156156
; CHECK: ## %bb.0: ## %entry
157157
; CHECK-NEXT: subl $28, %esp
158-
; CHECK-NEXT: .cfi_def_cfa_offset 32
159158
; CHECK-NEXT: fldt {{[0-9]+}}(%esp)
160159
; CHECK-NEXT: fstpt (%esp)
161160
; CHECK-NEXT: calll _ceil
@@ -180,11 +179,10 @@ declare x86_fp80 @ceil(x86_fp80)
180179
; test1 leaves a value on the stack that is needed after the asm.
181180
; Load %a from stack after ceil
182181
; Set up call to test.
183-
define void @testPR4484(x86_fp80 %a) {
182+
define void @testPR4484(x86_fp80 %a) nounwind {
184183
; CHECK-LABEL: testPR4484:
185184
; CHECK: ## %bb.0: ## %entry
186185
; CHECK-NEXT: subl $28, %esp
187-
; CHECK-NEXT: .cfi_def_cfa_offset 32
188186
; CHECK-NEXT: fldt {{[0-9]+}}(%esp)
189187
; CHECK-NEXT: fstpt {{[-0-9]+}}(%e{{[sb]}}p) ## 10-byte Folded Spill
190188
; CHECK-NEXT: calll _test1
@@ -204,7 +202,7 @@ entry:
204202
}
205203

206204
; PR4485
207-
define void @testPR4485(x86_fp80* %a) {
205+
define void @testPR4485(x86_fp80* %a) nounwind {
208206
; CHECK-LABEL: testPR4485:
209207
; CHECK: ## %bb.0: ## %entry
210208
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -439,11 +437,10 @@ entry:
439437
@fpu = external global %struct.fpu_t, align 16
440438

441439
; Function Attrs: ssp
442-
define void @test_live_st(i32 %a1) {
440+
define void @test_live_st(i32 %a1) nounwind {
443441
; CHECK-LABEL: test_live_st:
444442
; CHECK: ## %bb.0: ## %entry
445443
; CHECK-NEXT: subl $12, %esp
446-
; CHECK-NEXT: .cfi_def_cfa_offset 16
447444
; CHECK-NEXT: fldt (%eax)
448445
; CHECK-NEXT: cmpl $1, {{[0-9]+}}(%esp)
449446
; CHECK-NEXT: jne LBB20_2
@@ -491,7 +488,7 @@ return:
491488
}
492489

493490
; 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 {
495492
; CHECK-LABEL: test_operand_rewrite:
496493
; CHECK: ## %bb.0: ## %entry
497494
; CHECK-NEXT: ## InlineAsm Start

0 commit comments

Comments
 (0)