llvm.org GIT mirror llvm / 9fac7e2
[X86][AVX] Added extra memory folding tests for D19228 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266662 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 4 years ago
1 changed file(s) with 25 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1111 ret <8 x float> %shuffle
1212 }
1313
14 define <8 x float> @shuffle_v8f32_45670123_mem(<8 x float>* %pa, <8 x float>* %pb) nounwind uwtable readnone ssp {
15 ; ALL-LABEL: shuffle_v8f32_45670123_mem:
16 ; ALL: ## BB#0: ## %entry
17 ; ALL-NEXT: vperm2f128 {{.*#+}} ymm0 = mem[2,3,0,1]
18 ; ALL-NEXT: retq
19 entry:
20 %a = load <8 x float>, <8 x float>* %pa
21 %b = load <8 x float>, <8 x float>* %pb
22 %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32>
23 ret <8 x float> %shuffle
24 }
25
1426 define <8 x float> @shuffle_v8f32_0123cdef(<8 x float> %a, <8 x float> %b) nounwind uwtable readnone ssp {
1527 ; ALL-LABEL: shuffle_v8f32_0123cdef:
1628 ; ALL: ## BB#0: ## %entry
2739 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
2840 ; ALL-NEXT: retq
2941 entry:
42 %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32>
43 ret <8 x float> %shuffle
44 }
45
46 define <8 x float> @shuffle_v8f32_01230123_mem(<8 x float>* %pa, <8 x float>* %pb) nounwind uwtable readnone ssp {
47 ; ALL-LABEL: shuffle_v8f32_01230123_mem:
48 ; ALL: ## BB#0: ## %entry
49 ; ALL-NEXT: vmovaps (%rdi), %ymm0
50 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
51 ; ALL-NEXT: retq
52 entry:
53 %a = load <8 x float>, <8 x float>* %pa
54 %b = load <8 x float>, <8 x float>* %pb
3055 %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32>
3156 ret <8 x float> %shuffle
3257 }