mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 21:34:23 +00:00
Take Bill Wendling's suggestion for structuring a couple of asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124688 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a3138424cf
commit
9a14a362d0
@ -2874,9 +2874,9 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,
|
|||||||
assert(VT.getSimpleVT() <= N1.getValueType().getSimpleVT() &&
|
assert(VT.getSimpleVT() <= N1.getValueType().getSimpleVT() &&
|
||||||
"Extract subvector must be from larger vector to smaller vector!");
|
"Extract subvector must be from larger vector to smaller vector!");
|
||||||
|
|
||||||
if (ConstantSDNode *CSD = dyn_cast<ConstantSDNode>(Index.getNode())) {
|
if (isa<ConstantSDNode>(Index.getNode())) {
|
||||||
(void)CSD;
|
assert((VT.getVectorNumElements() +
|
||||||
assert((VT.getVectorNumElements() + CSD->getZExtValue()
|
cast<ConstantSDNode>(Index.getNode())->getZExtValue()
|
||||||
<= N1.getValueType().getVectorNumElements())
|
<= N1.getValueType().getVectorNumElements())
|
||||||
&& "Extract subvector overflow!");
|
&& "Extract subvector overflow!");
|
||||||
}
|
}
|
||||||
@ -3093,9 +3093,9 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,
|
|||||||
"Dest and insert subvector source types must match!");
|
"Dest and insert subvector source types must match!");
|
||||||
assert(N2.getValueType().getSimpleVT() <= N1.getValueType().getSimpleVT() &&
|
assert(N2.getValueType().getSimpleVT() <= N1.getValueType().getSimpleVT() &&
|
||||||
"Insert subvector must be from smaller vector to larger vector!");
|
"Insert subvector must be from smaller vector to larger vector!");
|
||||||
if (ConstantSDNode *CSD = dyn_cast<ConstantSDNode>(Index.getNode())) {
|
if (isa<ConstantSDNode>(Index.getNode())) {
|
||||||
(void)CSD;
|
assert((N2.getValueType().getVectorNumElements() +
|
||||||
assert((N2.getValueType().getVectorNumElements() + CSD->getZExtValue()
|
cast<ConstantSDNode>(Index.getNode())->getZExtValue()
|
||||||
<= VT.getVectorNumElements())
|
<= VT.getVectorNumElements())
|
||||||
&& "Insert subvector overflow!");
|
&& "Insert subvector overflow!");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user