From 0dd52092d0d067f5e1c7bda3c5087315c7ede6dd Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sun, 21 Sep 2014 11:12:19 +0000 Subject: [PATCH] [x86] Add some more comprehensive tests for v4f64 blending. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218207 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/vector-shuffle-256-v4.ll | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/test/CodeGen/X86/vector-shuffle-256-v4.ll b/test/CodeGen/X86/vector-shuffle-256-v4.ll index 283c83d50b7..b2338217407 100644 --- a/test/CodeGen/X86/vector-shuffle-256-v4.ll +++ b/test/CodeGen/X86/vector-shuffle-256-v4.ll @@ -356,6 +356,51 @@ define <4 x double> @shuffle_v4f64_5163(<4 x double> %a, <4 x double> %b) { ret <4 x double> %shuffle } +define <4 x double> @shuffle_v4f64_0527(<4 x double> %a, <4 x double> %b) { +; ALL-LABEL: @shuffle_v4f64_0527 +; ALL: # BB#0: +; ALL-NEXT: vshufpd {{.*}} # ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3] +; ALL-NEXT: retq + %shuffle = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> + ret <4 x double> %shuffle +} + +define <4 x double> @shuffle_v4f64_4163(<4 x double> %a, <4 x double> %b) { +; ALL-LABEL: @shuffle_v4f64_4163 +; ALL: # BB#0: +; ALL-NEXT: vshufpd {{.*}} # ymm0 = ymm1[0],ymm0[1],ymm1[2],ymm0[3] +; ALL-NEXT: retq + %shuffle = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> + ret <4 x double> %shuffle +} + +define <4 x double> @shuffle_v4f64_0145(<4 x double> %a, <4 x double> %b) { +; ALL-LABEL: @shuffle_v4f64_0145 +; ALL: # BB#0: +; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0 +; ALL-NEXT: retq + %shuffle = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> + ret <4 x double> %shuffle +} + +define <4 x double> @shuffle_v4f64_4501(<4 x double> %a, <4 x double> %b) { +; ALL-LABEL: @shuffle_v4f64_4501 +; ALL: # BB#0: +; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0 +; ALL-NEXT: retq + %shuffle = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> + ret <4 x double> %shuffle +} + +define <4 x double> @shuffle_v4f64_0167(<4 x double> %a, <4 x double> %b) { +; ALL-LABEL: @shuffle_v4f64_0167 +; ALL: # BB#0: +; ALL-NEXT: vblendpd {{.*}} # ymm0 = ymm0[0,1],ymm1[2,3] +; ALL-NEXT: retq + %shuffle = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> + ret <4 x double> %shuffle +} + define <4 x i64> @shuffle_v4i64_0124(<4 x i64> %a, <4 x i64> %b) { ; AVX1-LABEL: @shuffle_v4i64_0124 ; AVX1: # BB#0: