After introducing the limit for clobber walking, walkToPhiOrClobber would assert that the limit is at least 1 on entry.
The test included triggered that assert.
The callsite in tryOptimizePhi making the calls to walkToPhiOrClobber is structured like this:
while (true) { if (getBlockingAccess()) { // calls walkToPhiOrClobber } for (...) { walkToPhiOrClobber(); } }
The cleanest fix is to check if the limit was reached inside walkToPhiOrClobber, and give an allowence of 1.
This approach not make any alias() calls (no calls to instructionClobbersQuery), so the performance condition is enforced.
The limit is set back to 0 if not used, as this provides info on the fact that we stopped before reaching a true clobber.