This is a trivial fix for a C1 crash found by accident. Directly reproduce this issue by using java -XX:+UseSerialGC -XX:-UseTLAB -XX:TieredStopAtLevel=1. The reason is simple: the eden_allocate uses t2 as a register and zaps it, whereas C1 will use it as a register allocation candidate, leading to a crash. In this function, t0 never gets a use so we can use it safely. Tested in all cases.
Hi team,
This is a trivial fix for a C1 crash found by accident. Directly reproduce this issue by using
java -XX:+UseSerialGC -XX:-UseTLAB -XX:TieredStopAtLevel=1
. The reason is simple: theeden_allocate
usest2
as a register and zaps it, whereas C1 will use it as a register allocation candidate, leading to a crash. In this function,t0
never gets a use so we can use it safely. Tested in all cases.Thanks, Xiaolin