forked from OSchip/llvm-project
[x86] add hadd test with no undefs, remove duplicate tests; NFC
llvm-svn: 343975
This commit is contained in:
parent
d48789c0c4
commit
8459465a44
|
@ -467,19 +467,23 @@ define <2 x double> @add_pd_003(<2 x double> %x) {
|
|||
ret <2 x double> %add
|
||||
}
|
||||
|
||||
define <2 x double> @add_pd_005(<2 x double> %x) {
|
||||
; SSE-LABEL: add_pd_005:
|
||||
; Change shuffle mask - no undefs.
|
||||
|
||||
define <2 x double> @add_pd_003_2(<2 x double> %x) {
|
||||
; SSE-LABEL: add_pd_003_2:
|
||||
; SSE: # %bb.0:
|
||||
; SSE-NEXT: movddup {{.*#+}} xmm1 = xmm0[0,0]
|
||||
; SSE-NEXT: addpd %xmm1, %xmm0
|
||||
; SSE-NEXT: movapd %xmm0, %xmm1
|
||||
; SSE-NEXT: shufpd {{.*#+}} xmm1 = xmm1[1],xmm0[0]
|
||||
; SSE-NEXT: addpd %xmm0, %xmm1
|
||||
; SSE-NEXT: movapd %xmm1, %xmm0
|
||||
; SSE-NEXT: retq
|
||||
;
|
||||
; AVX-LABEL: add_pd_005:
|
||||
; AVX-LABEL: add_pd_003_2:
|
||||
; AVX: # %bb.0:
|
||||
; AVX-NEXT: vmovddup {{.*#+}} xmm1 = xmm0[0,0]
|
||||
; AVX-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
|
||||
; AVX-NEXT: vaddpd %xmm0, %xmm1, %xmm0
|
||||
; AVX-NEXT: retq
|
||||
%l = shufflevector <2 x double> %x, <2 x double> undef, <2 x i32> <i32 undef, i32 0>
|
||||
%l = shufflevector <2 x double> %x, <2 x double> undef, <2 x i32> <i32 1, i32 0>
|
||||
%add = fadd <2 x double> %l, %x
|
||||
ret <2 x double> %add
|
||||
}
|
||||
|
@ -505,27 +509,6 @@ define <2 x double> @add_pd_010(<2 x double> %x) {
|
|||
ret <2 x double> %shuffle2
|
||||
}
|
||||
|
||||
define <2 x double> @add_pd_012(<2 x double> %x) {
|
||||
; SSE-LABEL: add_pd_012:
|
||||
; SSE: # %bb.0:
|
||||
; SSE-NEXT: movddup {{.*#+}} xmm1 = xmm0[0,0]
|
||||
; SSE-NEXT: addpd %xmm0, %xmm1
|
||||
; SSE-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1,1]
|
||||
; SSE-NEXT: movapd %xmm1, %xmm0
|
||||
; SSE-NEXT: retq
|
||||
;
|
||||
; AVX-LABEL: add_pd_012:
|
||||
; AVX: # %bb.0:
|
||||
; AVX-NEXT: vmovddup {{.*#+}} xmm1 = xmm0[0,0]
|
||||
; AVX-NEXT: vaddpd %xmm0, %xmm1, %xmm0
|
||||
; AVX-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
|
||||
; AVX-NEXT: retq
|
||||
%l = shufflevector <2 x double> %x, <2 x double> undef, <2 x i32> <i32 undef, i32 0>
|
||||
%add = fadd <2 x double> %l, %x
|
||||
%shuffle = shufflevector <2 x double> %add, <2 x double> undef, <2 x i32> <i32 1, i32 undef>
|
||||
ret <2 x double> %shuffle
|
||||
}
|
||||
|
||||
define <4 x float> @add_ps_007(<4 x float> %x) {
|
||||
; SSE-LABEL: add_ps_007:
|
||||
; SSE: # %bb.0:
|
||||
|
@ -547,27 +530,6 @@ define <4 x float> @add_ps_007(<4 x float> %x) {
|
|||
ret <4 x float> %add
|
||||
}
|
||||
|
||||
define <4 x float> @add_ps_013(<4 x float> %x) {
|
||||
; SSE-LABEL: add_ps_013:
|
||||
; SSE: # %bb.0:
|
||||
; SSE-NEXT: movaps %xmm0, %xmm1
|
||||
; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1],xmm0[0,2]
|
||||
; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,1,1,3]
|
||||
; SSE-NEXT: addps %xmm1, %xmm0
|
||||
; SSE-NEXT: retq
|
||||
;
|
||||
; AVX-LABEL: add_ps_013:
|
||||
; AVX: # %bb.0:
|
||||
; AVX-NEXT: vpermilps {{.*#+}} xmm1 = xmm0[0,1,0,2]
|
||||
; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[0,1,1,3]
|
||||
; AVX-NEXT: vaddps %xmm0, %xmm1, %xmm0
|
||||
; AVX-NEXT: retq
|
||||
%l = shufflevector <4 x float> %x, <4 x float> undef, <4 x i32> <i32 undef, i32 undef, i32 0, i32 2>
|
||||
%r = shufflevector <4 x float> %x, <4 x float> undef, <4 x i32> <i32 undef, i32 undef, i32 1, i32 3>
|
||||
%add = fadd <4 x float> %l, %r
|
||||
ret <4 x float> %add
|
||||
}
|
||||
|
||||
define <4 x float> @add_ps_030(<4 x float> %x) {
|
||||
; SSE-LABEL: add_ps_030:
|
||||
; SSE: # %bb.0:
|
||||
|
@ -592,30 +554,6 @@ define <4 x float> @add_ps_030(<4 x float> %x) {
|
|||
ret <4 x float> %shuffle2
|
||||
}
|
||||
|
||||
define <4 x float> @add_ps_036(<4 x float> %x) {
|
||||
; SSE-LABEL: add_ps_036:
|
||||
; SSE: # %bb.0:
|
||||
; SSE-NEXT: movaps %xmm0, %xmm1
|
||||
; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1],xmm0[0,2]
|
||||
; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,1,1,3]
|
||||
; SSE-NEXT: addps %xmm1, %xmm0
|
||||
; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,2,2,3]
|
||||
; SSE-NEXT: retq
|
||||
;
|
||||
; AVX-LABEL: add_ps_036:
|
||||
; AVX: # %bb.0:
|
||||
; AVX-NEXT: vpermilps {{.*#+}} xmm1 = xmm0[0,1,0,2]
|
||||
; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[0,1,1,3]
|
||||
; AVX-NEXT: vaddps %xmm0, %xmm1, %xmm0
|
||||
; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,2,2,3]
|
||||
; AVX-NEXT: retq
|
||||
%l = shufflevector <4 x float> %x, <4 x float> undef, <4 x i32> <i32 undef, i32 undef, i32 0, i32 2>
|
||||
%r = shufflevector <4 x float> %x, <4 x float> undef, <4 x i32> <i32 undef, i32 undef, i32 1, i32 3>
|
||||
%add = fadd <4 x float> %l, %r
|
||||
%shuffle = shufflevector <4 x float> %add, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 undef, i32 undef>
|
||||
ret <4 x float> %shuffle
|
||||
}
|
||||
|
||||
define <4 x float> @add_ps_007_2(<4 x float> %x) {
|
||||
; SSE-LABEL: add_ps_007_2:
|
||||
; SSE: # %bb.0:
|
||||
|
@ -653,43 +591,6 @@ define <4 x float> @add_ps_008(<4 x float> %x) {
|
|||
ret <4 x float> %add
|
||||
}
|
||||
|
||||
define <4 x float> @add_ps_011(<4 x float> %x) {
|
||||
; SSE-LABEL: add_ps_011:
|
||||
; SSE: # %bb.0:
|
||||
; SSE-NEXT: movddup {{.*#+}} xmm1 = xmm0[0,0]
|
||||
; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,1,1,3]
|
||||
; SSE-NEXT: addps %xmm1, %xmm0
|
||||
; SSE-NEXT: retq
|
||||
;
|
||||
; AVX-LABEL: add_ps_011:
|
||||
; AVX: # %bb.0:
|
||||
; AVX-NEXT: vmovddup {{.*#+}} xmm1 = xmm0[0,0]
|
||||
; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[0,1,1,3]
|
||||
; AVX-NEXT: vaddps %xmm0, %xmm1, %xmm0
|
||||
; AVX-NEXT: retq
|
||||
%l = shufflevector <4 x float> %x, <4 x float> undef, <4 x i32> <i32 undef, i32 undef, i32 0, i32 undef>
|
||||
%r = shufflevector <4 x float> %x, <4 x float> undef, <4 x i32> <i32 undef, i32 undef, i32 1, i32 undef>
|
||||
%add = fadd <4 x float> %l, %r
|
||||
ret <4 x float> %add
|
||||
}
|
||||
|
||||
define <4 x float> @add_ps_012(<4 x float> %x) {
|
||||
; SSE-LABEL: add_ps_012:
|
||||
; SSE: # %bb.0:
|
||||
; SSE-NEXT: movsldup {{.*#+}} xmm1 = xmm0[0,0,2,2]
|
||||
; SSE-NEXT: addps %xmm1, %xmm0
|
||||
; SSE-NEXT: retq
|
||||
;
|
||||
; AVX-LABEL: add_ps_012:
|
||||
; AVX: # %bb.0:
|
||||
; AVX-NEXT: vmovsldup {{.*#+}} xmm1 = xmm0[0,0,2,2]
|
||||
; AVX-NEXT: vaddps %xmm0, %xmm1, %xmm0
|
||||
; AVX-NEXT: retq
|
||||
%l = shufflevector <4 x float> %x, <4 x float> undef, <4 x i32> <i32 undef, i32 undef, i32 undef, i32 2>
|
||||
%add = fadd <4 x float> %l, %x
|
||||
ret <4 x float> %add
|
||||
}
|
||||
|
||||
define <4 x float> @add_ps_017(<4 x float> %x) {
|
||||
; SSE-LABEL: add_ps_017:
|
||||
; SSE: # %bb.0:
|
||||
|
@ -734,47 +635,3 @@ define <4 x float> @add_ps_018(<4 x float> %x) {
|
|||
ret <4 x float> %shuffle2
|
||||
}
|
||||
|
||||
define <4 x float> @add_ps_021(<4 x float> %x) {
|
||||
; SSE-LABEL: add_ps_021:
|
||||
; SSE: # %bb.0:
|
||||
; SSE-NEXT: movsldup {{.*#+}} xmm1 = xmm0[0,0,2,2]
|
||||
; SSE-NEXT: addps %xmm0, %xmm1
|
||||
; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1,2,3]
|
||||
; SSE-NEXT: movaps %xmm1, %xmm0
|
||||
; SSE-NEXT: retq
|
||||
;
|
||||
; AVX-LABEL: add_ps_021:
|
||||
; AVX: # %bb.0:
|
||||
; AVX-NEXT: vmovsldup {{.*#+}} xmm1 = xmm0[0,0,2,2]
|
||||
; AVX-NEXT: vaddps %xmm0, %xmm1, %xmm0
|
||||
; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
|
||||
; AVX-NEXT: retq
|
||||
%l = shufflevector <4 x float> %x, <4 x float> undef, <4 x i32> <i32 undef, i32 undef, i32 undef, i32 2>
|
||||
%add = fadd <4 x float> %l, %x
|
||||
%shuffle = shufflevector <4 x float> %add, <4 x float> undef, <4 x i32> <i32 3, i32 undef, i32 undef, i32 undef>
|
||||
ret <4 x float> %shuffle
|
||||
}
|
||||
|
||||
define <4 x float> @add_ps_022(<4 x float> %x) {
|
||||
; SSE-LABEL: add_ps_022:
|
||||
; SSE: # %bb.0:
|
||||
; SSE-NEXT: movddup {{.*#+}} xmm1 = xmm0[0,0]
|
||||
; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,1,1,3]
|
||||
; SSE-NEXT: addps %xmm1, %xmm0
|
||||
; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,2,2,3]
|
||||
; SSE-NEXT: retq
|
||||
;
|
||||
; AVX-LABEL: add_ps_022:
|
||||
; AVX: # %bb.0:
|
||||
; AVX-NEXT: vmovddup {{.*#+}} xmm1 = xmm0[0,0]
|
||||
; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[0,1,1,3]
|
||||
; AVX-NEXT: vaddps %xmm0, %xmm1, %xmm0
|
||||
; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[0,2,2,3]
|
||||
; AVX-NEXT: retq
|
||||
%l = shufflevector <4 x float> %x, <4 x float> undef, <4 x i32> <i32 undef, i32 undef, i32 0, i32 undef>
|
||||
%r = shufflevector <4 x float> %x, <4 x float> undef, <4 x i32> <i32 undef, i32 undef, i32 1, i32 undef>
|
||||
%add = fadd <4 x float> %l, %r
|
||||
%shuffle = shufflevector <4 x float> %add, <4 x float> undef, <4 x i32> <i32 undef, i32 2, i32 undef, i32 undef>
|
||||
ret <4 x float> %shuffle
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue