Skip to content

Commit

Permalink
JIT: Fix delegate GDV for loops with multiple cloning options (#109407)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jakobbotsch authored Oct 31, 2024
1 parent f72784f commit 6ac8d05
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/coreclr/jit/loopcloning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ bool Compiler::optDeriveLoopCloningConditions(FlowGraphNaturalLoop* loop, LoopCl
}

default:
JITDUMP("Unknown opt\n");
assert(!"Unknown opt type");
return false;
}
}
Expand Down Expand Up @@ -1378,12 +1378,14 @@ bool Compiler::optDeriveLoopCloningConditions(FlowGraphNaturalLoop* loop, LoopCl
// TODO: ensure array is dereference-able?
}
break;

case LcOptInfo::LcTypeTest:
case LcOptInfo::LcMethodAddrTest:
// handled above
break;

default:
JITDUMP("Unknown opt\n");
assert(!"Unknown opt type");
return false;
}
}
Expand Down

0 comments on commit 6ac8d05

Please sign in to comment.