llvm.org GIT mirror llvm / 882cdfd
Fix PR2850 and PR2863. Only generate movddup for 128-bit SSE vector shuffles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57210 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 12 years ago
2 changed file(s) with 13 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
39533953
39543954 // Canonicalize movddup shuffles.
39553955 if (V2IsUndef && Subtarget->hasSSE2() &&
3956 VT.getSizeInBits() == 128 &&
39563957 X86::isMOVDDUPMask(PermMask.getNode()))
39573958 return CanonicalizeMovddup(Op, V1, PermMask, DAG, Subtarget->hasSSE3());
39583959
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+mmx,+sse2
1 ; PR2850
2
3 @tmp_V2i = common global <2 x i32> zeroinitializer ; <<2 x i32>*> [#uses=2]
4
5 define void @f0() nounwind {
6 entry:
7 %0 = load <2 x i32>* @tmp_V2i, align 8 ; <<2 x i32>> [#uses=1]
8 %1 = shufflevector <2 x i32> %0, <2 x i32> undef, <2 x i32> zeroinitializer ; <<2 x i32>> [#uses=1]
9 store <2 x i32> %1, <2 x i32>* @tmp_V2i, align 8
10 ret void
11 }