summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-04-19 06:40:30 +0000
committerDuncan Sands <baldrick@free.fr>2009-04-19 06:40:30 +0000
commitf2e7133d341c61e30bc7dd56308d0b2e5c6273a7 (patch)
tree4b533feacc44a29b8b3079d7e2f255807d54bf94 /llvm/lib
parent3da896d861c706c2241104e83aabf2d0569ba0c0 (diff)
downloadbcm5719-llvm-f2e7133d341c61e30bc7dd56308d0b2e5c6273a7.tar.gz
bcm5719-llvm-f2e7133d341c61e30bc7dd56308d0b2e5c6273a7.zip
Now that BUILD_VECTOR operands are allowed to be
bigger than the vector element type, turn checking of the operand type back on again, appropriately adjusted. llvm-svn: 69516
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 0b2ef855fd6..be0102c846a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -762,15 +762,12 @@ void SelectionDAG::VerifyNode(SDNode *N) {
assert(N->getValueType(0).isVector() && "Wrong return type!");
assert(N->getNumOperands() == N->getValueType(0).getVectorNumElements() &&
"Wrong number of operands!");
- // FIXME: Change vector_shuffle to a variadic node with mask elements being
- // operands of the node. Currently the mask is a BUILD_VECTOR passed as an
- // operand, and it is not always possible to legalize it. Turning off the
- // following checks at least makes it possible to legalize most of the time.
-// MVT EltVT = N->getValueType(0).getVectorElementType();
-// for (SDNode::op_iterator I = N->op_begin(), E = N->op_end(); I != E; ++I)
-// assert((I->getValueType() == EltVT ||
-// I->getValueType() == TLI.getTypeToTransformTo(EltVT)) &&
-// "Wrong operand type!");
+ MVT EltVT = N->getValueType(0).getVectorElementType();
+ for (SDNode::op_iterator I = N->op_begin(), E = N->op_end(); I != E; ++I)
+ assert((I->getValueType() == EltVT ||
+ (EltVT.isInteger() && I->getValueType().isInteger() &&
+ EltVT.bitsLE(I->getValueType()))) &&
+ "Wrong operand type!");
break;
}
}
OpenPOWER on IntegriCloud