summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-08-08 08:03:12 +0000
committerCraig Topper <craig.topper@gmail.com>2013-08-08 08:03:12 +0000
commiteee2a11ee38307ea3b0bbd43c33e5fad182f0951 (patch)
tree2f8569967c374ae812e3513e549d07253fb239de
parent37c107b9b57aab9a13cde0d1db41b66565941f9d (diff)
downloadllvm-eee2a11ee38307ea3b0bbd43c33e5fad182f0951.tar.gz
llvm-eee2a11ee38307ea3b0bbd43c33e5fad182f0951.tar.bz2
llvm-eee2a11ee38307ea3b0bbd43c33e5fad182f0951.tar.xz
Remove AllUndef check from one of the loops in getVectorShuffle. It was already handled by the 'AllLHS && AllRHS' check after the previous loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187965 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index bc6063c36d..66be160afe 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1351,17 +1351,13 @@ SDValue SelectionDAG::getVectorShuffle(EVT VT, SDLoc dl, SDValue N1,
commuteShuffle(N1, N2, MaskVec);
}
- // If Identity shuffle, or all shuffle in to undef, return that node.
- bool AllUndef = true;
+ // If Identity shuffle return that node.
bool Identity = true;
for (unsigned i = 0; i != NElts; ++i) {
if (MaskVec[i] >= 0 && MaskVec[i] != (int)i) Identity = false;
- if (MaskVec[i] >= 0) AllUndef = false;
}
if (Identity && NElts == N1.getValueType().getVectorNumElements())
return N1;
- if (AllUndef)
- return getUNDEF(VT);
FoldingSetNodeID ID;
SDValue Ops[2] = { N1, N2 };