Skip to content

Commit 6c6413f

Browse files
committed
[TableGen] Fixup #139715
The increment must be after the assert, not before, otherwise the assert fails everytime.
1 parent e99ca74 commit 6c6413f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2611,8 +2611,8 @@ void GICombinerEmitter::emitTestSimplePredicate(raw_ostream &OS) {
26112611
// (GICXXPred_Invalid + 1).
26122612
unsigned ExpectedID = 0;
26132613
for (const auto &ID : keys(AllCombineRules)) {
2614-
++ExpectedID;
26152614
assert(ExpectedID == ID && "combine rules are not ordered!");
2615+
++ExpectedID;
26162616
OS << " " << getIsEnabledPredicateEnumName(ID) << EnumeratorSeparator;
26172617
EnumeratorSeparator = ",\n";
26182618
}

0 commit comments

Comments
 (0)