Skip to content

Commit 6ac8d05

Browse files
authored
JIT: Fix delegate GDV for loops with multiple cloning options (#109407)
For loops that we consider candidates for cloning with multiple cloning options there was a logic bug that caused cloning to exit early. This affected even canonical loops over arrays.
1 parent f72784f commit 6ac8d05

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/coreclr/jit/loopcloning.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ bool Compiler::optDeriveLoopCloningConditions(FlowGraphNaturalLoop* loop, LoopCl
11811181
}
11821182

11831183
default:
1184-
JITDUMP("Unknown opt\n");
1184+
assert(!"Unknown opt type");
11851185
return false;
11861186
}
11871187
}
@@ -1378,12 +1378,14 @@ bool Compiler::optDeriveLoopCloningConditions(FlowGraphNaturalLoop* loop, LoopCl
13781378
// TODO: ensure array is dereference-able?
13791379
}
13801380
break;
1381+
13811382
case LcOptInfo::LcTypeTest:
1383+
case LcOptInfo::LcMethodAddrTest:
13821384
// handled above
13831385
break;
13841386

13851387
default:
1386-
JITDUMP("Unknown opt\n");
1388+
assert(!"Unknown opt type");
13871389
return false;
13881390
}
13891391
}

0 commit comments

Comments
 (0)