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

Christian Hagedorn christian.hagedorn at oracle.com
Tue Mar 17 11:20:25 UTC 2020


Hi Roland

On 17.03.20 10:05, Roland Westrelin wrote:
>> Yes, that comment seems wrong. What I actually meant was (concrete)
>> range check predicates nodes like upper bound checks created in
>> PhaseIdealLoop::loop_predication_impl_helper() which do not have
>> additional outputs to data nodes (the skeleton predicates have the
>> control edges to these data nodes).
> 
> Can there really be a range check predicate that has some uses but none
> of which are data uses in the loop?

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.

Best regards,
Christian


More information about the hotspot-compiler-dev mailing list