llvm.org GIT mirror llvm / 29c353b
Using target specific nodes for shuffle nodes makes the mask check more strict, breaking some cases not checked in the testsuite, but also exposes some foldings not done before, as this example: movaps (%rdi), %xmm0 movaps (%rax), %xmm1 movaps %xmm0, %xmm2 movss %xmm1, %xmm2 shufps $36, %xmm2, %xmm0 now is generated as: movaps (%rdi), %xmm0 movaps %xmm0, %xmm1 movlps (%rax), %xmm1 shufps $36, %xmm1, %xmm0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112753 91177308-0d34-0410-b5e6-96231b3b80d8 Bruno Cardoso Lopes 10 years ago
2 changed file(s) with 17 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
59085908 def : Pat<(X86Movlps VR128:$src1,
59095909 (bc_v4f32 (v2f64 (scalar_to_vector (loadf64 addr:$src2))))),
59105910 (MOVLPSrm VR128:$src1, addr:$src2)>;
5911 def : Pat<(X86Movlps VR128:$src1,
5912 (bc_v4i32 (v2i64 (load addr:$src2)))),
5913 (MOVLPSrm VR128:$src1, addr:$src2)>;
59115914
59125915 // Shuffle with MOVLPD
59135916 def : Pat<(v2f64 (X86Movlpd VR128:$src1, (load addr:$src2))),
0 ; RUN: llc < %s -march=x86-64 | FileCheck %s
1
2 define <4 x i32> @t00(<4 x i32>* %a0) nounwind ssp {
3 entry:
4 ; CHECK: movaps (%rdi), %xmm0
5 ; CHECK-NEXT: movaps %xmm0, %xmm1
6 ; CHECK-NEXT: movlps (%rax), %xmm1
7 ; CHECK-NEXT: shufps $36, %xmm1, %xmm0
8 %0 = load <4 x i32>* undef, align 16
9 %1 = load <4 x i32>* %a0, align 16
10 %2 = shufflevector <4 x i32> %1, <4 x i32> %0, <4 x i32>
11 ret <4 x i32> %2
12 }
13