From 9056d415cb7da3d156e2a1cc41601410bab5c697 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 11 Jan 2017 18:48:00 +0000 Subject: [PATCH] [X86][XOP] Add vpermil2ps target shuffle -> insertps combine test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291690 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/vector-shuffle-combining-xop.ll | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/CodeGen/X86/vector-shuffle-combining-xop.ll b/test/CodeGen/X86/vector-shuffle-combining-xop.ll index 23e40a6572a..b79df1facfa 100644 --- a/test/CodeGen/X86/vector-shuffle-combining-xop.ll +++ b/test/CodeGen/X86/vector-shuffle-combining-xop.ll @@ -91,6 +91,20 @@ define <4 x float> @combine_vpermil2ps_1z74(<4 x float> %a0, <4 x float> %a1) { ret <4 x float> %res1 } +define <4 x float> @combine_vpermil2ps_02zu(<4 x float> %a0, <4 x float> %a1) { +; X32-LABEL: combine_vpermil2ps_02zu: +; X32: # BB#0: +; X32-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,2],zero,zero +; X32-NEXT: retl +; +; X64-LABEL: combine_vpermil2ps_02zu: +; X64: # BB#0: +; X64-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,2],zero,zero +; X64-NEXT: retq + %res0 = call <4 x float> @llvm.x86.xop.vpermil2ps(<4 x float> %a0, <4 x float> zeroinitializer, <4 x i32> , i8 0) + ret <4 x float> %res0 +} + define <8 x float> @combine_vpermil2ps256_identity(<8 x float> %a0, <8 x float> %a1) { ; X32-LABEL: combine_vpermil2ps256_identity: ; X32: # BB#0: -- 2.40.0