summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-06-06 11:15:36 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-06-06 11:15:36 +0000
commitdc8affe607a06fe76779bc20e50d26dda98af4cb (patch)
tree94c2220a8d2f2bc371ac7f5229e546278e8726e3 /llvm
parent8c2c07258288ef2df09d6a89f9cb468051ac51bc (diff)
downloadbcm5719-llvm-dc8affe607a06fe76779bc20e50d26dda98af4cb.tar.gz
bcm5719-llvm-dc8affe607a06fe76779bc20e50d26dda98af4cb.zip
[X86][SSE] Add nonuniform constant vector test for PR42105
llvm-svn: 362697
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/CodeGen/X86/fp-fold.ll14
1 files changed, 13 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/X86/fp-fold.ll b/llvm/test/CodeGen/X86/fp-fold.ll
index 29a657a1f34..aee45185700 100644
--- a/llvm/test/CodeGen/X86/fp-fold.ll
+++ b/llvm/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, <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) {
; ANY-LABEL: fsub_neg_y_commute:
; ANY: # %bb.0:
OpenPOWER on IntegriCloud