RFR: 8281429: PhiNode::Value() is too conservative for tripcount of CountedLoop [v6]

Xin Liu xliu at openjdk.java.net
Thu Apr 14 00:40:07 UTC 2022


On Mon, 11 Apr 2022 09:07:34 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> The type for the iv phi of a counted loop is computed from the types
>> of the phi on loop entry and the type of the limit from the exit
>> test. Because the exit test is applied to the iv after increment, the
>> type of the iv phi is at least one less than the limit (for a positive
>> stride, one more for a negative stride).
>> 
>> Also, for a stride whose absolute value is not 1 and constant init and
>> limit values, it's possible to compute accurately the iv phi type.
>> 
>> This change caused a few failures and I had to make a few adjustments
>> to loop opts code as well.
>
> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
> 
>   redo change removed by error

src/hotspot/share/opto/loopnode.cpp line 854:

> 852:     swap(lo, hi);
> 853:   }
> 854:   if (hi->hi_as_long() <= lo->lo_as_long()) {

why this is <= instead of < ?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7823


More information about the hotspot-compiler-dev mailing list