RFR: 8323220: Reassociate loop invariants involved in Cmps and Add/Subs [v3]
Xin Liu
xliu at openjdk.org
Sat Jan 20 08:50:28 UTC 2024
On Sat, 20 Jan 2024 08:32:10 GMT, Xin Liu <xliu at openjdk.org> wrote:
>> Joshua Cao has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Assert for n2. Variables for n1/n2 opcode. More concise comments.
>> Overflow/random tests
>
> src/hotspot/share/opto/loopTransform.cpp line 356:
>
>> 354: }
>> 355:
>> 356: bool is_int = n2->bottom_type()->isa_int() != nullptr;
>
> I guess you change to n2 because n1 may be CmpI/L.
> I think it still works because TypeInt::CC is still isa_int(). or we add a comment to make it more clear?
Sorry, I think you're right. we have to use 'n2' here.
we need to distinct CmpI and CmpL. TypeInt::CC can't.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17375#discussion_r1460304622
More information about the hotspot-compiler-dev
mailing list