8176506: C2: loop unswitching and unsafe accesses cause crashReviewed-by: vlivanov, mcberg, kvn, simonis