From 647e9f80aff2894bb42d67a481275107af64ea5d Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 18 Apr 2016 19:48:16 +0000 Subject: [X86][AVX] Added extra memory folding tests for D19228 llvm-svn: 266662 --- llvm/test/CodeGen/X86/avx-vperm2x128.ll | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'llvm/test') diff --git a/llvm/test/CodeGen/X86/avx-vperm2x128.ll b/llvm/test/CodeGen/X86/avx-vperm2x128.ll index 973914a850d..964d7527f95 100644 --- a/llvm/test/CodeGen/X86/avx-vperm2x128.ll +++ b/llvm/test/CodeGen/X86/avx-vperm2x128.ll @@ -12,6 +12,18 @@ entry: ret <8 x float> %shuffle } +define <8 x float> @shuffle_v8f32_45670123_mem(<8 x float>* %pa, <8 x float>* %pb) nounwind uwtable readnone ssp { +; ALL-LABEL: shuffle_v8f32_45670123_mem: +; ALL: ## BB#0: ## %entry +; ALL-NEXT: vperm2f128 {{.*#+}} ymm0 = mem[2,3,0,1] +; ALL-NEXT: retq +entry: + %a = load <8 x float>, <8 x float>* %pa + %b = load <8 x float>, <8 x float>* %pb + %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> + ret <8 x float> %shuffle +} + define <8 x float> @shuffle_v8f32_0123cdef(<8 x float> %a, <8 x float> %b) nounwind uwtable readnone ssp { ; ALL-LABEL: shuffle_v8f32_0123cdef: ; ALL: ## BB#0: ## %entry @@ -32,6 +44,19 @@ entry: ret <8 x float> %shuffle } +define <8 x float> @shuffle_v8f32_01230123_mem(<8 x float>* %pa, <8 x float>* %pb) nounwind uwtable readnone ssp { +; ALL-LABEL: shuffle_v8f32_01230123_mem: +; ALL: ## BB#0: ## %entry +; ALL-NEXT: vmovaps (%rdi), %ymm0 +; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0 +; ALL-NEXT: retq +entry: + %a = load <8 x float>, <8 x float>* %pa + %b = load <8 x float>, <8 x float>* %pb + %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> + ret <8 x float> %shuffle +} + define <8 x float> @shuffle_v8f32_45674567(<8 x float> %a, <8 x float> %b) nounwind uwtable readnone ssp { ; ALL-LABEL: shuffle_v8f32_45674567: ; ALL: ## BB#0: ## %entry -- cgit v1.2.3