RFR: 8307683: Loop Predication is wrongly applied to non-RangeCheckNodes without a LoadRangeNode [v2]
Christian Hagedorn
chagedorn at openjdk.org
Fri May 26 23:34:26 UTC 2023
On Fri, 26 May 2023 08:26:27 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> Christian Hagedorn has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - fix assertion
>> - new fix with bailout for "if iv <u limit then trap"
>
> src/hotspot/share/opto/loopPredicate.cpp line 856:
>
>> 854: if (range->Opcode() != Op_LoadRange) {
>> 855: const TypeInteger* tinteger = phase->_igvn.type(range)->isa_integer(bt);
>> 856: if (!iff->is_RangeCheck() || tinteger == nullptr || tinteger->empty() || tinteger->lo_as_long() < 0) {
>
> Can the problem not happen with a LoadRange as second input? Couldn't the LoadRange constant fold and then the predicates could constant fold as well?
You're right. It's also a problem with a `LoadRange`, even if it does not constant fold.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14156#discussion_r1207476796
More information about the hotspot-compiler-dev
mailing list