aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-09-14 02:36:14 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-09-14 02:36:14 +0000
commit5ca0d149158eaa8e30cbd00efa0024149b029bb0 (patch)
tree5f4de3840957776b97e44c7192c2189688a2e964 /lib
parent553f93396367fd1e1372d41c02583b2dc060947f (diff)
downloadexternal_llvm-5ca0d149158eaa8e30cbd00efa0024149b029bb0.zip
external_llvm-5ca0d149158eaa8e30cbd00efa0024149b029bb0.tar.gz
external_llvm-5ca0d149158eaa8e30cbd00efa0024149b029bb0.tar.bz2
Vector shuffle mask <i32 4, i32 5, i32 2, i32 3> should yield "movsd", not "movss".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index 988b557..0839ecd 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -6348,7 +6348,9 @@ SDValue getMOVLP(SDValue &Op, DebugLoc &dl, SelectionDAG &DAG, bool HasSSE2) {
// matching to x86 specific nodes. Note that for the 1st condition all
// types are matched with movsd.
if (HasSSE2) {
- if (NumElems == 2)
+ // FIXME: isMOVLMask should be checked and matched before getMOVLP,
+ // as to remove this logic from here, as much as possible
+ if (NumElems == 2 || !X86::isMOVLMask(SVOp))
return getTargetShuffleNode(X86ISD::MOVSD, dl, VT, V1, V2, DAG);
return getTargetShuffleNode(X86ISD::MOVSS, dl, VT, V1, V2, DAG);
}