RFR(XS): 8229450: C2 compilation fails with assert(found_sfpt) failed
rwestrel at redhat.com
Fri Aug 30 13:50:43 UTC 2019
> I just did cosmetic things for your patch. Could you review and sponsor
Let me run some more testing with it.
> Could you tell me what 'chain of events' leads you to your test1?
Something like this:
1- we need a loop that's strip mined and followed by a test with the same
test as the exit condition with a dependent load (the load has to have
its control input set to the right branch of the if)
- One way to have a load with a control set is to have a load from an
array (because then, the load is dependent on an array bound check). A
field load wouldn't be directly control dependent.
- but the load must be directly dependent on the if, there must be no
bound check in between: one way for c2 to optimize out the bound check
is it can prove it's useless which is the case for a newly allocated
- but a load from a newly allocated would also be optimized out so let's
put a non inlined call in the way to defeat that optimization
2- we need the if to be optimized out during loop opts. If it's right at
the exit of the loop, then IGVN optimizes it out before the strip mined
loop is even created so put extra control flow between the if and the
loop exit to get in the way of the IGVN optimization
with a lot of trial and error and going back and forth between the test
and what c2 actually generates.
More information about the hotspot-compiler-dev