summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2016-04-18 19:48:16 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2016-04-18 19:48:16 +0000
commit647e9f80aff2894bb42d67a481275107af64ea5d (patch)
tree05c5c90727270ae29baaeb92dfa83dc404255c66
parentfdf0d5ffc6608ab9e3f294a1942f200917af0ef7 (diff)
downloadbcm5719-llvm-647e9f80aff2894bb42d67a481275107af64ea5d.tar.gz
bcm5719-llvm-647e9f80aff2894bb42d67a481275107af64ea5d.zip
[X86][AVX] Added extra memory folding tests for D19228
llvm-svn: 266662
-rw-r--r--llvm/test/CodeGen/X86/avx-vperm2x128.ll25
1 files changed, 25 insertions, 0 deletions
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> <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
+ 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> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
+ 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
OpenPOWER on IntegriCloud