2
2
; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -check-prefix=WIN64
3
3
; RUN: llc < %s -mtriple=x86_64-mingw32 | FileCheck %s -check-prefix=WIN64
4
4
5
- define i64 @double_to_i128 (double %d ) nounwind {
5
+ define i64 @double_to_i128 (double %d ) nounwind strictfp {
6
6
; WIN64-LABEL: double_to_i128:
7
7
; WIN64: # %bb.0:
8
8
; WIN64-NEXT: subq $40, %rsp
@@ -15,7 +15,7 @@ define i64 @double_to_i128(double %d) nounwind {
15
15
ret i64 %2
16
16
}
17
17
18
- define i64 @double_to_ui128 (double %d ) nounwind {
18
+ define i64 @double_to_ui128 (double %d ) nounwind strictfp {
19
19
; WIN64-LABEL: double_to_ui128:
20
20
; WIN64: # %bb.0:
21
21
; WIN64-NEXT: subq $40, %rsp
@@ -28,7 +28,7 @@ define i64 @double_to_ui128(double %d) nounwind {
28
28
ret i64 %2
29
29
}
30
30
31
- define i64 @float_to_i128 (float %d ) nounwind {
31
+ define i64 @float_to_i128 (float %d ) nounwind strictfp {
32
32
; WIN64-LABEL: float_to_i128:
33
33
; WIN64: # %bb.0:
34
34
; WIN64-NEXT: subq $40, %rsp
@@ -41,7 +41,7 @@ define i64 @float_to_i128(float %d) nounwind {
41
41
ret i64 %2
42
42
}
43
43
44
- define i64 @float_to_ui128 (float %d ) nounwind {
44
+ define i64 @float_to_ui128 (float %d ) nounwind strictfp {
45
45
; WIN64-LABEL: float_to_ui128:
46
46
; WIN64: # %bb.0:
47
47
; WIN64-NEXT: subq $40, %rsp
@@ -54,12 +54,13 @@ define i64 @float_to_ui128(float %d) nounwind {
54
54
ret i64 %2
55
55
}
56
56
57
- define i64 @longdouble_to_i128 (ptr nocapture readonly %0 ) nounwind {
57
+ define i64 @longdouble_to_i128 (ptr nocapture readonly %0 ) nounwind strictfp {
58
58
; WIN64-LABEL: longdouble_to_i128:
59
59
; WIN64: # %bb.0:
60
60
; WIN64-NEXT: subq $56, %rsp
61
61
; WIN64-NEXT: fldt (%rcx)
62
62
; WIN64-NEXT: fstpt {{[0-9]+}}(%rsp)
63
+ ; WIN64-NEXT: wait
63
64
; WIN64-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
64
65
; WIN64-NEXT: callq __fixxfti
65
66
; WIN64-NEXT: movq %xmm0, %rax
@@ -71,12 +72,13 @@ define i64 @longdouble_to_i128(ptr nocapture readonly %0) nounwind {
71
72
ret i64 %4
72
73
}
73
74
74
- define i64 @longdouble_to_ui128 (ptr nocapture readonly %0 ) nounwind {
75
+ define i64 @longdouble_to_ui128 (ptr nocapture readonly %0 ) nounwind strictfp {
75
76
; WIN64-LABEL: longdouble_to_ui128:
76
77
; WIN64: # %bb.0:
77
78
; WIN64-NEXT: subq $56, %rsp
78
79
; WIN64-NEXT: fldt (%rcx)
79
80
; WIN64-NEXT: fstpt {{[0-9]+}}(%rsp)
81
+ ; WIN64-NEXT: wait
80
82
; WIN64-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
81
83
; WIN64-NEXT: callq __fixunsxfti
82
84
; WIN64-NEXT: movq %xmm0, %rax
@@ -88,7 +90,7 @@ define i64 @longdouble_to_ui128(ptr nocapture readonly %0) nounwind {
88
90
ret i64 %4
89
91
}
90
92
91
- define double @i128_to_double (ptr nocapture readonly %0 ) nounwind {
93
+ define double @i128_to_double (ptr nocapture readonly %0 ) nounwind strictfp {
92
94
; WIN64-LABEL: i128_to_double:
93
95
; WIN64: # %bb.0:
94
96
; WIN64-NEXT: subq $56, %rsp
@@ -103,7 +105,7 @@ define double @i128_to_double(ptr nocapture readonly %0) nounwind {
103
105
ret double %3
104
106
}
105
107
106
- define double @ui128_to_double (ptr nocapture readonly %0 ) nounwind {
108
+ define double @ui128_to_double (ptr nocapture readonly %0 ) nounwind strictfp {
107
109
; WIN64-LABEL: ui128_to_double:
108
110
; WIN64: # %bb.0:
109
111
; WIN64-NEXT: subq $56, %rsp
@@ -118,7 +120,7 @@ define double @ui128_to_double(ptr nocapture readonly %0) nounwind {
118
120
ret double %3
119
121
}
120
122
121
- define float @i128_to_float (ptr nocapture readonly %0 ) nounwind {
123
+ define float @i128_to_float (ptr nocapture readonly %0 ) nounwind strictfp {
122
124
; WIN64-LABEL: i128_to_float:
123
125
; WIN64: # %bb.0:
124
126
; WIN64-NEXT: subq $56, %rsp
@@ -133,7 +135,7 @@ define float @i128_to_float(ptr nocapture readonly %0) nounwind {
133
135
ret float %3
134
136
}
135
137
136
- define float @ui128_to_float (ptr nocapture readonly %0 ) nounwind {
138
+ define float @ui128_to_float (ptr nocapture readonly %0 ) nounwind strictfp {
137
139
; WIN64-LABEL: ui128_to_float:
138
140
; WIN64: # %bb.0:
139
141
; WIN64-NEXT: subq $56, %rsp
@@ -148,7 +150,7 @@ define float @ui128_to_float(ptr nocapture readonly %0) nounwind {
148
150
ret float %3
149
151
}
150
152
151
- define void @i128_to_longdouble (ptr noalias nocapture sret (x86_fp80 ) align 16 %agg.result , ptr nocapture readonly %0 ) nounwind {
153
+ define void @i128_to_longdouble (ptr noalias nocapture sret (x86_fp80 ) align 16 %agg.result , ptr nocapture readonly %0 ) nounwind strictfp {
152
154
; WIN64-LABEL: i128_to_longdouble:
153
155
; WIN64: # %bb.0:
154
156
; WIN64-NEXT: pushq %rsi
@@ -161,6 +163,7 @@ define void @i128_to_longdouble(ptr noalias nocapture sret(x86_fp80) align 16 %a
161
163
; WIN64-NEXT: callq __floattixf
162
164
; WIN64-NEXT: fldt {{[0-9]+}}(%rsp)
163
165
; WIN64-NEXT: fstpt (%rsi)
166
+ ; WIN64-NEXT: wait
164
167
; WIN64-NEXT: movq %rsi, %rax
165
168
; WIN64-NEXT: addq $64, %rsp
166
169
; WIN64-NEXT: popq %rsi
@@ -171,7 +174,7 @@ define void @i128_to_longdouble(ptr noalias nocapture sret(x86_fp80) align 16 %a
171
174
ret void
172
175
}
173
176
174
- define void @ui128_to_longdouble (ptr noalias nocapture sret (x86_fp80 ) align 16 %agg.result , ptr nocapture readonly %0 ) nounwind {
177
+ define void @ui128_to_longdouble (ptr noalias nocapture sret (x86_fp80 ) align 16 %agg.result , ptr nocapture readonly %0 ) nounwind strictfp {
175
178
; WIN64-LABEL: ui128_to_longdouble:
176
179
; WIN64: # %bb.0:
177
180
; WIN64-NEXT: pushq %rsi
@@ -184,6 +187,7 @@ define void @ui128_to_longdouble(ptr noalias nocapture sret(x86_fp80) align 16 %
184
187
; WIN64-NEXT: callq __floatuntixf
185
188
; WIN64-NEXT: fldt {{[0-9]+}}(%rsp)
186
189
; WIN64-NEXT: fstpt (%rsi)
190
+ ; WIN64-NEXT: wait
187
191
; WIN64-NEXT: movq %rsi, %rax
188
192
; WIN64-NEXT: addq $64, %rsp
189
193
; WIN64-NEXT: popq %rsi
0 commit comments