1 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=corei7 | FileCheck %s
3 ; FNEG is defined as subtraction from -0.0.
5 ; This test verifies that we use an xor with a constant to flip the sign bits; no subtraction needed.
6 define <4 x float> @t1(<4 x float> %Q) {
8 ; CHECK: xorps {{.*}}LCPI0_0{{.*}}, %xmm0
10 %tmp = fsub <4 x float> < float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00 >, %Q
14 ; This test verifies that we generate an FP subtraction because "0.0 - x" is not an fneg.
15 define <4 x float> @t2(<4 x float> %Q) {
17 ; CHECK: xorps %[[X:xmm[0-9]+]], %[[X]]
18 ; CHECK-NEXT: subps %xmm0, %[[X]]
19 ; CHECK-NEXT: movaps %[[X]], %xmm0
21 %tmp = fsub <4 x float> zeroinitializer, %Q