[llvm] r362697 - [X86][SSE] Add nonuniform constant vector test for PR42105

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 04:15:36 PDT 2019


Author: rksimon
Date: Thu Jun  6 04:15:36 2019
New Revision: 362697

URL: http://llvm.org/viewvc/llvm-project?rev=362697&view=rev
Log:
[X86][SSE] Add nonuniform constant vector test for PR42105

Modified:
    llvm/trunk/test/CodeGen/X86/fp-fold.ll

Modified: llvm/trunk/test/CodeGen/X86/fp-fold.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fp-fold.ll?rev=362697&r1=362696&r2=362697&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fp-fold.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fp-fold.ll Thu Jun  6 04:15:36 2019
@@ -99,7 +99,7 @@ define float @fsub_neg_y(float %x, float
   ret float %r
 }
 
-define <4 x float> @fsub_neg_y_vector(<4 x float> %x, <4 x float>%y) {
+define <4 x float> @fsub_neg_y_vector(<4 x float> %x, <4 x float> %y) {
 ; ANY-LABEL: fsub_neg_y_vector:
 ; ANY:       # %bb.0:
 ; ANY-NEXT:    mulps {{.*}}(%rip), %xmm0
@@ -109,6 +109,18 @@ define <4 x float> @fsub_neg_y_vector(<4
   %add = fadd <4 x float> %mul, %y
   %r = fsub nsz reassoc <4 x float> %y, %add
   ret <4 x float> %r
+}
+
+define <4 x float> @fsub_neg_y_vector_nonuniform(<4 x float> %x, <4 x float> %y) {
+; ANY-LABEL: fsub_neg_y_vector_nonuniform:
+; ANY:       # %bb.0:
+; ANY-NEXT:    mulps {{.*}}(%rip), %xmm0
+; ANY-NEXT:    xorps {{.*}}(%rip), %xmm0
+; ANY-NEXT:    retq
+  %mul = fmul <4 x float> %x, <float 5.0, float 6.0, float 7.0, float 8.0>
+  %add = fadd <4 x float> %mul, %y
+  %r = fsub nsz reassoc <4 x float> %y, %add
+  ret <4 x float> %r
 }
 
 define float @fsub_neg_y_commute(float %x, float %y) {




More information about the llvm-commits mailing list