summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2016-12-11 19:36:25 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2016-12-11 19:36:25 +0000
commit8766a76f3d561c42c95281f2ca0f8da489a5d824 (patch)
treec6f6a152883f729bf7847010f1767c6014349095
parentba1bf875869251328408e98567053528ff79cff7 (diff)
downloadbcm5719-llvm-8766a76f3d561c42c95281f2ca0f8da489a5d824.tar.gz
bcm5719-llvm-8766a76f3d561c42c95281f2ca0f8da489a5d824.zip
[X86][XOP] Add target shuffle tests showing missing PSHUFPD combine.
llvm-svn: 289398
-rw-r--r--llvm/test/CodeGen/X86/vector-shuffle-combining-xop.ll28
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/vector-shuffle-combining-xop.ll b/llvm/test/CodeGen/X86/vector-shuffle-combining-xop.ll
index b81b57f9474..17a2aa6a16d 100644
--- a/llvm/test/CodeGen/X86/vector-shuffle-combining-xop.ll
+++ b/llvm/test/CodeGen/X86/vector-shuffle-combining-xop.ll
@@ -147,6 +147,34 @@ define <4 x float> @combine_vpermil2ps_blend_with_zero(<4 x float> %a0, <4 x flo
ret <4 x float> %res0
}
+define <2 x double> @combine_vpermil2pd_as_shufpd(<2 x double> %a0, <2 x double> %a1) {
+; X32-LABEL: combine_vpermil2pd_as_shufpd:
+; X32: # BB#0:
+; X32-NEXT: vpermil2pd {{.*#+}} xmm0 = xmm0[1],xmm1[0]
+; X32-NEXT: retl
+;
+; X64-LABEL: combine_vpermil2pd_as_shufpd:
+; X64: # BB#0:
+; X64-NEXT: vpermil2pd {{.*#+}} xmm0 = xmm0[1],xmm1[0]
+; X64-NEXT: retq
+ %res0 = call <2 x double> @llvm.x86.xop.vpermil2pd(<2 x double> %a0, <2 x double> %a1, <2 x i64> <i64 2, i64 4>, i8 0)
+ ret <2 x double> %res0
+}
+
+define <4 x double> @combine_vpermil2pd256_as_shufpd(<4 x double> %a0, <4 x double> %a1) {
+; X32-LABEL: combine_vpermil2pd256_as_shufpd:
+; X32: # BB#0:
+; X32-NEXT: vpermil2pd {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[3],ymm1[3]
+; X32-NEXT: retl
+;
+; X64-LABEL: combine_vpermil2pd256_as_shufpd:
+; X64: # BB#0:
+; X64-NEXT: vpermil2pd {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[3],ymm1[3]
+; X64-NEXT: retq
+ %res0 = call <4 x double> @llvm.x86.xop.vpermil2pd.256(<4 x double> %a0, <4 x double> %a1, <4 x i64> <i64 0, i64 4, i64 2, i64 7>, i8 0)
+ ret <4 x double> %res0
+}
+
define <16 x i8> @combine_vpperm_identity(<16 x i8> %a0, <16 x i8> %a1) {
; X32-LABEL: combine_vpperm_identity:
; X32: # BB#0:
OpenPOWER on IntegriCloud