1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -fast-isel -fast-isel-abort=3 -mtriple=x86_64-apple-darwin10 | FileCheck %s
3 ; RUN: llc < %s -fast-isel -mtriple=i686-- -mattr=+sse2 | FileCheck --check-prefix=SSE2 %s
5 define double @doo(double %x) nounwind {
8 ; CHECK-NEXT: movq %xmm0, %rax
9 ; CHECK-NEXT: movabsq $-9223372036854775808, %rcx ## imm = 0x8000000000000000
10 ; CHECK-NEXT: xorq %rax, %rcx
11 ; CHECK-NEXT: movq %rcx, %xmm0
16 ; SSE2-NEXT: pushl %ebp
17 ; SSE2-NEXT: movl %esp, %ebp
18 ; SSE2-NEXT: andl $-8, %esp
19 ; SSE2-NEXT: subl $8, %esp
20 ; SSE2-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
21 ; SSE2-NEXT: xorps {{\.LCPI.*}}, %xmm0
22 ; SSE2-NEXT: movlps %xmm0, (%esp)
23 ; SSE2-NEXT: fldl (%esp)
24 ; SSE2-NEXT: movl %ebp, %esp
25 ; SSE2-NEXT: popl %ebp
27 %y = fsub double -0.0, %x
31 define float @foo(float %x) nounwind {
34 ; CHECK-NEXT: movd %xmm0, %eax
35 ; CHECK-NEXT: xorl $2147483648, %eax ## imm = 0x80000000
36 ; CHECK-NEXT: movd %eax, %xmm0
41 ; SSE2-NEXT: pushl %eax
42 ; SSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
43 ; SSE2-NEXT: xorps {{\.LCPI.*}}, %xmm0
44 ; SSE2-NEXT: movss %xmm0, (%esp)
45 ; SSE2-NEXT: flds (%esp)
46 ; SSE2-NEXT: popl %eax
48 %y = fsub float -0.0, %x
52 define void @goo(double* %x, double* %y) nounwind {
55 ; CHECK-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
56 ; CHECK-NEXT: movq %xmm0, %rax
57 ; CHECK-NEXT: movabsq $-9223372036854775808, %rcx ## imm = 0x8000000000000000
58 ; CHECK-NEXT: xorq %rax, %rcx
59 ; CHECK-NEXT: movq %rcx, %xmm0
60 ; CHECK-NEXT: movq %xmm0, (%rsi)
65 ; SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
66 ; SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
67 ; SSE2-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
68 ; SSE2-NEXT: xorps {{\.LCPI.*}}, %xmm0
69 ; SSE2-NEXT: movsd %xmm0, (%eax)
71 %a = load double, double* %x
72 %b = fsub double -0.0, %a
73 store double %b, double* %y
77 define void @loo(float* %x, float* %y) nounwind {
80 ; CHECK-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
81 ; CHECK-NEXT: movd %xmm0, %eax
82 ; CHECK-NEXT: xorl $2147483648, %eax ## imm = 0x80000000
83 ; CHECK-NEXT: movd %eax, %xmm0
84 ; CHECK-NEXT: movd %xmm0, (%rsi)
89 ; SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
90 ; SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
91 ; SSE2-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
92 ; SSE2-NEXT: movd %xmm0, %ecx
93 ; SSE2-NEXT: xorl $2147483648, %ecx # imm = 0x80000000
94 ; SSE2-NEXT: movd %ecx, %xmm0
95 ; SSE2-NEXT: movd %xmm0, (%eax)
97 %a = load float, float* %x
98 %b = fsub float -0.0, %a
99 store float %b, float* %y
103 define double @too(double %x) nounwind {
106 ; CHECK-NEXT: movq %xmm0, %rax
107 ; CHECK-NEXT: movabsq $-9223372036854775808, %rcx ## imm = 0x8000000000000000
108 ; CHECK-NEXT: xorq %rax, %rcx
109 ; CHECK-NEXT: movq %rcx, %xmm0
114 ; SSE2-NEXT: pushl %ebp
115 ; SSE2-NEXT: movl %esp, %ebp
116 ; SSE2-NEXT: andl $-8, %esp
117 ; SSE2-NEXT: subl $8, %esp
118 ; SSE2-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
119 ; SSE2-NEXT: xorps {{\.LCPI.*}}, %xmm0
120 ; SSE2-NEXT: movlps %xmm0, (%esp)
121 ; SSE2-NEXT: fldl (%esp)
122 ; SSE2-NEXT: movl %ebp, %esp
123 ; SSE2-NEXT: popl %ebp
129 define float @zoo(float %x) nounwind {
132 ; CHECK-NEXT: movd %xmm0, %eax
133 ; CHECK-NEXT: xorl $2147483648, %eax ## imm = 0x80000000
134 ; CHECK-NEXT: movd %eax, %xmm0
139 ; SSE2-NEXT: pushl %eax
140 ; SSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
141 ; SSE2-NEXT: xorps {{\.LCPI.*}}, %xmm0
142 ; SSE2-NEXT: movss %xmm0, (%esp)
143 ; SSE2-NEXT: flds (%esp)
144 ; SSE2-NEXT: popl %eax