Skip to content

Commit 82a2c96

Browse files
committed
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351318 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent b8c855b commit 82a2c96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9266,7 +9266,7 @@ SDNode *SelectionDAG::isConstantFPBuildVectorOrConstantFP(SDValue N) {
92669266

92679267
void SelectionDAG::createOperands(SDNode *Node, ArrayRef<SDValue> Vals) {
92689268
assert(!Node->OperandList && "Node already has operands");
9269-
assert(std::numeric_limits<decltype(SDNode::NumOperands)>::max() >
9269+
assert(std::numeric_limits<decltype(SDNode::NumOperands)>::max() >=
92709270
Vals.size() &&
92719271
"too many operands to fit into SDNode");
92729272
SDUse *Ops = OperandRecycler.allocate(

0 commit comments

Comments
 (0)