1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=i686-- -mattr=+sse2 -enable-unsafe-fp-math | FileCheck %s
3
4; Don't fold the incoming stack arguments into the xorps instructions used
5; to do floating-point negations, because the arguments aren't vectors
6; and aren't vector-aligned.
7
8define void @foo(float* %p, float* %q, float %s, float %y) {
9; CHECK-LABEL: foo:
10; CHECK:       # %bb.0:
11; CHECK-NEXT:    movl {{[0-9]+}}(%esp), %eax
12; CHECK-NEXT:    movl {{[0-9]+}}(%esp), %ecx
13; CHECK-NEXT:    movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
14; CHECK-NEXT:    movaps {{.*#+}} xmm1 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
15; CHECK-NEXT:    xorps %xmm1, %xmm0
16; CHECK-NEXT:    movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
17; CHECK-NEXT:    xorps %xmm1, %xmm2
18; CHECK-NEXT:    movss %xmm0, (%ecx)
19; CHECK-NEXT:    movss %xmm2, (%eax)
20; CHECK-NEXT:    retl
21  %ss = fsub float -0.0, %s
22  %yy = fsub float -0.0, %y
23  store float %ss, float* %p
24  store float %yy, float* %q
25  ret void
26}
27