summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMatt Beaumont-Gay <matthewbg@google.com>2011-02-01 22:12:50 +0000
committerMatt Beaumont-Gay <matthewbg@google.com>2011-02-01 22:12:50 +0000
commit29c8c8fe927828aae6311b9c2ff50bf866695cef (patch)
treeaa1615c868432701ba7568b6e3af92f65fbd123c /llvm/lib
parent195e69536f0f5c0778eb71b46a31385a213f0ba6 (diff)
downloadbcm5719-llvm-29c8c8fe927828aae6311b9c2ff50bf866695cef.tar.gz
bcm5719-llvm-29c8c8fe927828aae6311b9c2ff50bf866695cef.zip
Take Bill Wendling's suggestion for structuring a couple of asserts.
llvm-svn: 124688
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index d14cae39192..f3994b76cb6 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2874,9 +2874,9 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,
assert(VT.getSimpleVT() <= N1.getValueType().getSimpleVT() &&
"Extract subvector must be from larger vector to smaller vector!");
- if (ConstantSDNode *CSD = dyn_cast<ConstantSDNode>(Index.getNode())) {
- (void)CSD;
- assert((VT.getVectorNumElements() + CSD->getZExtValue()
+ if (isa<ConstantSDNode>(Index.getNode())) {
+ assert((VT.getVectorNumElements() +
+ cast<ConstantSDNode>(Index.getNode())->getZExtValue()
<= N1.getValueType().getVectorNumElements())
&& "Extract subvector overflow!");
}
@@ -3093,9 +3093,9 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,
"Dest and insert subvector source types must match!");
assert(N2.getValueType().getSimpleVT() <= N1.getValueType().getSimpleVT() &&
"Insert subvector must be from smaller vector to larger vector!");
- if (ConstantSDNode *CSD = dyn_cast<ConstantSDNode>(Index.getNode())) {
- (void)CSD;
- assert((N2.getValueType().getVectorNumElements() + CSD->getZExtValue()
+ if (isa<ConstantSDNode>(Index.getNode())) {
+ assert((N2.getValueType().getVectorNumElements() +
+ cast<ConstantSDNode>(Index.getNode())->getZExtValue()
<= VT.getVectorNumElements())
&& "Insert subvector overflow!");
}
OpenPOWER on IntegriCloud