summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-28 19:04:49 +0000
committerChris Lattner <sabre@nondot.org>2006-03-28 19:04:49 +0000
commitffec47ebff0a328736ac4648586d19591620c83a (patch)
tree42cee0bf7a476d02fdcc3290562909dfd390c50c /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent66e1410858482c4c7b2b7730e141305f8a9fa5e0 (diff)
downloadbcm5719-llvm-ffec47ebff0a328736ac4648586d19591620c83a.tar.gz
bcm5719-llvm-ffec47ebff0a328736ac4648586d19591620c83a.zip
Add an assertion
llvm-svn: 27228
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 218ed8997f8..47c9cbc017c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -634,6 +634,8 @@ SDOperand SelectionDAG::getZeroExtendInReg(SDOperand Op, MVT::ValueType VT) {
SDOperand SelectionDAG::getConstant(uint64_t Val, MVT::ValueType VT) {
assert(MVT::isInteger(VT) && "Cannot create FP integer constant!");
+ assert(!MVT::isVector(VT) && "Cannot create Vector ConstantSDNodes!");
+
// Mask out any bits that are not valid for this constant.
if (VT != MVT::i64)
Val &= ((uint64_t)1 << MVT::getSizeInBits(VT)) - 1;
OpenPOWER on IntegriCloud