summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2019-01-16 10:06:04 +0000
committerFlorian Hahn <flo@fhahn.com>2019-01-16 10:06:04 +0000
commite94470f1ccc79fe26f69548ae39165577beb3098 (patch)
tree49bb869ba8a3518a329b64d5ce513eca75033985
parent1ad53ca2b0114004a3bbaf9fbfe23f51aec0ee67 (diff)
downloadbcm5719-llvm-e94470f1ccc79fe26f69548ae39165577beb3098.tar.gz
bcm5719-llvm-e94470f1ccc79fe26f69548ae39165577beb3098.zip
[SelectionDAG] Update check in createOperands to reflect max() is a valid value.
The value returned by max() is the last valid value, adjust the comparison accordingly. The code added in D55073 creates TokenFactors with max() operands. Reviewers: aemerson, efriedma, RKSimon, craig.topper Reviewed By: aemerson Differential Revision: https://reviews.llvm.org/D56738 llvm-svn: 351318
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 07ad9c7ce1b..647496c1afc 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -9266,7 +9266,7 @@ SDNode *SelectionDAG::isConstantFPBuildVectorOrConstantFP(SDValue N) {
void SelectionDAG::createOperands(SDNode *Node, ArrayRef<SDValue> Vals) {
assert(!Node->OperandList && "Node already has operands");
- assert(std::numeric_limits<decltype(SDNode::NumOperands)>::max() >
+ assert(std::numeric_limits<decltype(SDNode::NumOperands)>::max() >=
Vals.size() &&
"too many operands to fit into SDNode");
SDUse *Ops = OperandRecycler.allocate(
OpenPOWER on IntegriCloud