Skip to content

Commit 20ecb06

Browse files
https://github.com/llvm/llvm-project/issues/90328
Modified the assert statement
1 parent 2755c69 commit 20ecb06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/CodeGen/TargetSchedule.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ resolveSchedClass(const MachineInstr *MI) const {
129129
unsigned NIter = 0;
130130
#endif
131131
while (SCDesc->isVariant()) {
132-
assert(++NIter < 6 && "Variants are nested deeper than the magic number");
132+
++NIter;
133+
assert(NIter < 6 && "Variants are nested deeper than the magic number");
133134

134135
SchedClass = STI->resolveSchedClass(SchedClass, MI, this);
135136
SCDesc = SchedModel.getSchedClassDesc(SchedClass);

0 commit comments

Comments
 (0)