RFR(XS): 8183543: Aarch64: C2 compilation often fails with "failed spill-split-recycle sanity check"

Roland Westrelin rwestrel at redhat.com
Tue Jul 4 14:11:34 UTC 2017


On aarch64, C2 compilation sometimes fail:

COMPILE SKIPPED: failed spill-split-recycle sanity check (not retryable) 

An example of a simple method for which compilation fails is:

static int test() {
    TestSpill a1 = arg1;
    if (a1 == null) {
    int res = 0;

    res = a1.vol_f;

    return res;

The volatile field access after the call uses indirect memory
addressing, the AddP of the address computation is scheduled before the
call so a derived pointer is live at the call. The reason the
compilation fails is because the register allocator finds it can't
perform the allocation, flags the live range of the derived pointer for
spilling, spilling heuristics explicitly skip derived pointers at calls
and fail to spill. AFAIU, a call should be considered a high register
pressure area of the code and force spilling around the call. That
doesn't happen with the current value of INTPRESSURE (25) but lowering
it to 24 fixes it.


More information about the hotspot-compiler-dev mailing list