3
3
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefixes=X64
4
4
5
5
; FIXME: Missing fsub(x,fneg(y)) -> fadd(x,y) fold
6
- define float @fneg_strict_fsub_to_strict_fadd (float %x , float %y ) nounwind {
6
+ define float @fneg_strict_fsub_to_strict_fadd (float %x , float %y ) nounwind strictfp {
7
7
; X86-LABEL: fneg_strict_fsub_to_strict_fadd:
8
8
; X86: # %bb.0:
9
9
; X86-NEXT: pushl %eax
@@ -13,6 +13,7 @@ define float @fneg_strict_fsub_to_strict_fadd(float %x, float %y) nounwind {
13
13
; X86-NEXT: subss %xmm1, %xmm0
14
14
; X86-NEXT: movss %xmm0, (%esp)
15
15
; X86-NEXT: flds (%esp)
16
+ ; X86-NEXT: wait
16
17
; X86-NEXT: popl %eax
17
18
; X86-NEXT: retl
18
19
;
@@ -27,7 +28,7 @@ define float @fneg_strict_fsub_to_strict_fadd(float %x, float %y) nounwind {
27
28
}
28
29
29
30
; FIXME: Missing fsub(x,fneg(y)) -> fadd(x,y) fold
30
- define double @fneg_strict_fsub_to_strict_fadd_d (double %x , double %y ) nounwind {
31
+ define double @fneg_strict_fsub_to_strict_fadd_d (double %x , double %y ) nounwind strictfp {
31
32
; X86-LABEL: fneg_strict_fsub_to_strict_fadd_d:
32
33
; X86: # %bb.0:
33
34
; X86-NEXT: pushl %ebp
@@ -40,6 +41,7 @@ define double @fneg_strict_fsub_to_strict_fadd_d(double %x, double %y) nounwind
40
41
; X86-NEXT: subsd %xmm1, %xmm0
41
42
; X86-NEXT: movsd %xmm0, (%esp)
42
43
; X86-NEXT: fldl (%esp)
44
+ ; X86-NEXT: wait
43
45
; X86-NEXT: movl %ebp, %esp
44
46
; X86-NEXT: popl %ebp
45
47
; X86-NEXT: retl
@@ -55,7 +57,7 @@ define double @fneg_strict_fsub_to_strict_fadd_d(double %x, double %y) nounwind
55
57
}
56
58
57
59
; FIXME: Missing fneg(fsub(x,y)) -> fsub(y,x) fold
58
- define float @strict_fsub_fneg_to_strict_fsub (float %x , float %y ) nounwind {
60
+ define float @strict_fsub_fneg_to_strict_fsub (float %x , float %y ) nounwind strictfp {
59
61
; X86-LABEL: strict_fsub_fneg_to_strict_fsub:
60
62
; X86: # %bb.0:
61
63
; X86-NEXT: pushl %eax
@@ -64,6 +66,7 @@ define float @strict_fsub_fneg_to_strict_fsub(float %x, float %y) nounwind {
64
66
; X86-NEXT: xorps {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0
65
67
; X86-NEXT: movss %xmm0, (%esp)
66
68
; X86-NEXT: flds (%esp)
69
+ ; X86-NEXT: wait
67
70
; X86-NEXT: popl %eax
68
71
; X86-NEXT: retl
69
72
;
@@ -78,7 +81,7 @@ define float @strict_fsub_fneg_to_strict_fsub(float %x, float %y) nounwind {
78
81
}
79
82
80
83
; FIXME: Missing fneg(fsub(x,y)) -> fsub(y,x) fold
81
- define double @strict_fsub_fneg_to_strict_fsub_d (double %x , double %y ) nounwind {
84
+ define double @strict_fsub_fneg_to_strict_fsub_d (double %x , double %y ) nounwind strictfp {
82
85
; X86-LABEL: strict_fsub_fneg_to_strict_fsub_d:
83
86
; X86: # %bb.0:
84
87
; X86-NEXT: pushl %ebp
@@ -90,6 +93,7 @@ define double @strict_fsub_fneg_to_strict_fsub_d(double %x, double %y) nounwind
90
93
; X86-NEXT: xorpd {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0
91
94
; X86-NEXT: movlpd %xmm0, (%esp)
92
95
; X86-NEXT: fldl (%esp)
96
+ ; X86-NEXT: wait
93
97
; X86-NEXT: movl %ebp, %esp
94
98
; X86-NEXT: popl %ebp
95
99
; X86-NEXT: retl
0 commit comments