[TableGen] Fixup #139715

The increment must be after the assert, not before, otherwise the assert fails everytime.
diff --git a/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp b/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp
index d11812b..f095982 100644
--- a/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp
+++ b/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp
@@ -2611,8 +2611,8 @@
     // (GICXXPred_Invalid + 1).
     unsigned ExpectedID = 0;
     for (const auto &ID : keys(AllCombineRules)) {
-      ++ExpectedID;
       assert(ExpectedID == ID && "combine rules are not ordered!");
+      ++ExpectedID;
       OS << "  " << getIsEnabledPredicateEnumName(ID) << EnumeratorSeparator;
       EnumeratorSeparator = ",\n";
     }