RFR: 8289996: Fix array range check hoisting for some scaled loop iv

Pengfei Li pli at openjdk.org
Mon Jul 18 09:22:58 UTC 2022


On Sun, 17 Jul 2022 16:53:23 GMT, Quan Anh Mai <duke at openjdk.org> wrote:

>> I think this only defers the transformation if scale value is a constant and has exactly 2 bits set in binary. Could you elaborate how to make it more particular?
>> 
>> AFAIK, all normal Java array accesses are using 32-bit indices. When running on a 64-bit platform, we use a `ConvI2L` in element address computing but it's done after whole index expression computing. Is there any special array accesses that may use `MulL`?
>
> I mean this stops the whole idealisation as soon as the constant has exactly 2 bits set, I think we should still try other transformations in `MulNode::Ideal` in those cases.
> 
> IIRC, memory segment accesses use long arithmetic, so they need this changes, too.
> 
> Thanks.

Thanks for your suggestions. I will update the code later after some tests.

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

PR: https://git.openjdk.org/jdk/pull/9508


More information about the hotspot-compiler-dev mailing list