[llvm] r343854 - [x86] add test for fneg matching failure; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 5 07:49:21 PDT 2018


Author: spatel
Date: Fri Oct  5 07:49:20 2018
New Revision: 343854

URL: http://llvm.org/viewvc/llvm-project?rev=343854&view=rev
Log:
[x86] add test for fneg matching failure; NFC

Modified:
    llvm/trunk/test/CodeGen/X86/vec_fneg.ll

Modified: llvm/trunk/test/CodeGen/X86/vec_fneg.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_fneg.ll?rev=343854&r1=343853&r2=343854&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vec_fneg.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vec_fneg.ll Fri Oct  5 07:49:20 2018
@@ -98,3 +98,22 @@ define <2 x float> @fneg_bitcast(i64 %i)
   %fneg = fsub <2 x float> <float -0.0, float -0.0>, %bitcast
   ret <2 x float> %fneg
 }
+
+define <4 x float> @undef_elts_v4f32(<4 x float> %x) {
+; X32-SSE-LABEL: undef_elts_v4f32:
+; X32-SSE:       # %bb.0:
+; X32-SSE-NEXT:    movaps {{.*#+}} xmm1 = <-0,u,u,-0>
+; X32-SSE-NEXT:    subps %xmm0, %xmm1
+; X32-SSE-NEXT:    movaps %xmm1, %xmm0
+; X32-SSE-NEXT:    retl
+;
+; X64-SSE-LABEL: undef_elts_v4f32:
+; X64-SSE:       # %bb.0:
+; X64-SSE-NEXT:    movaps {{.*#+}} xmm1 = <-0,u,u,-0>
+; X64-SSE-NEXT:    subps %xmm0, %xmm1
+; X64-SSE-NEXT:    movaps %xmm1, %xmm0
+; X64-SSE-NEXT:    retq
+  %r = fsub <4 x float> <float -0.0, float undef, float undef, float -0.0>, %x
+  ret <4 x float> %r
+}
+




More information about the llvm-commits mailing list