forked from OSchip/llvm-project
[X86][SSE] Add nonuniform constant vector test for PR42105
llvm-svn: 362697
This commit is contained in:
parent
8c2c072582
commit
dc8affe607
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue