[15] RFR(M): 8240227: Loop predicates should be copied to unswitched loops

Roland Westrelin rwestrel at redhat.com
Tue Mar 17 13:13:13 UTC 2020


> Yes, there are cases where the split-if optimization moves a store out 
> of a loop in PhaseIdealLoop::try_move_store_before_loop() which is an 
> input to such a load with a control input from a range check predicate. 
> As a result, the newly created loop nest in 
> PhaseIdealLoop::build_loop_late() does no longer contain the load node 
> when applying the loop unswitch optimization. I added an additional 
> comment about it in webrev.01.

What would happen if you were to clone a predicate with no use in the
loop? Wouldn't that be harmless? Actually, couldn't a predicate with no
use (that are always cloned) be one of those?

Roland.



More information about the hotspot-compiler-dev mailing list