diff options
author | Florian Hahn <flo@fhahn.com> | 2019-01-16 10:06:04 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2019-01-16 10:06:04 +0000 |
commit | fa970076109609e1536d5ea84183980b69324f60 (patch) | |
tree | b1eb86cb40e64dc33dea031863b5e9c4a3c5ea07 | |
parent | cfc634568912cfa3c3dd68c19aaf54aeccc72dab (diff) |
[SelectionDAG] Update check in createOperands to reflect max() is a valid value.linaro-local/ci/tcwg_kernel/llvm-master-aarch64-mainline-allmodconfig
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
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
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( |