From: Simon Pilgrim Date: Thu, 6 Jun 2019 11:15:36 +0000 (+0000) Subject: [X86][SSE] Add nonuniform constant vector test for PR42105 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b719570ea75523ed07871bb1f25e9275acb0537b;p=llvm [X86][SSE] Add nonuniform constant vector test for PR42105 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362697 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/X86/fp-fold.ll b/test/CodeGen/X86/fp-fold.ll index 29a657a1f34..aee45185700 100644 --- a/test/CodeGen/X86/fp-fold.ll +++ b/test/CodeGen/X86/fp-fold.ll @@ -99,7 +99,7 @@ define float @fsub_neg_y(float %x, float %y) { 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 @@ -111,6 +111,18 @@ define <4 x float> @fsub_neg_y_vector(<4 x float> %x, <4 x float>%y) { 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, + %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) { ; ANY-LABEL: fsub_neg_y_commute: ; ANY: # %bb.0: