aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-07-18 20:12:05 +0000
committerDuncan Sands <baldrick@free.fr>2008-07-18 20:12:05 +0000
commit41903b53e0cd2acd6751827431a6c46a778e80ab (patch)
treea5e6cf4f337d01d12dd39e12089ab22f0b244874 /lib/CodeGen
parente1790de6c0dd6f60e6c4b47e464cda28cd1a8f0e (diff)
downloadexternal_llvm-41903b53e0cd2acd6751827431a6c46a778e80ab.zip
external_llvm-41903b53e0cd2acd6751827431a6c46a778e80ab.tar.gz
external_llvm-41903b53e0cd2acd6751827431a6c46a778e80ab.tar.bz2
Revert 53729, after waking up in the middle of
the night realising that it was wrong :) I think the reason the same type was being used for the shufflevec of indices as for the actual indices is so that if one of them needs splitting then so does the other. After my patch it might be that the indices need splitting but not the rest, yet there is no good way of handling that. I think the right solution is to not have the shufflevec be an operand at all: just have it be the list of numbers it actually is, stored as extra info in the node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index bc685ef..14efb44 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -5046,9 +5046,9 @@ SDOperand DAGCombiner::XformToShuffleWithZero(SDNode *N) {
if (!isa<ConstantSDNode>(Elt))
return SDOperand();
else if (cast<ConstantSDNode>(Elt)->isAllOnesValue())
- IdxOps.push_back(DAG.getConstant(i, TLI.getPointerTy()));
+ IdxOps.push_back(DAG.getConstant(i, EVT));
else if (cast<ConstantSDNode>(Elt)->isNullValue())
- IdxOps.push_back(DAG.getConstant(NumElts, TLI.getPointerTy()));
+ IdxOps.push_back(DAG.getConstant(NumElts, EVT));
else
return SDOperand();
}
@@ -5066,8 +5066,7 @@ SDOperand DAGCombiner::XformToShuffleWithZero(SDNode *N) {
std::vector<SDOperand> ZeroOps(NumElts, DAG.getConstant(0, EVT));
Ops.push_back(DAG.getNode(ISD::BUILD_VECTOR, VT,
&ZeroOps[0], ZeroOps.size()));
- Ops.push_back(DAG.getNode(ISD::BUILD_VECTOR,
- MVT::getVectorVT(TLI.getPointerTy(), NumElts),
+ Ops.push_back(DAG.getNode(ISD::BUILD_VECTOR, VT,
&IdxOps[0], IdxOps.size()));
SDOperand Result = DAG.getNode(ISD::VECTOR_SHUFFLE, VT,
&Ops[0], Ops.size());