RFR: 8280003: C1: Reconsider uses of logical_and immediates in LIRGenerator::do_getObjectSize [v3]
Aleksey Shipilev
shade at openjdk.java.net
Fri Jan 28 10:36:55 UTC 2022
On Wed, 19 Jan 2022 16:44:34 GMT, Sergey Nazarkin <snazarki at openjdk.org> wrote:
>> How is it strict? We are about to cast to _unsigned int_, surely we want to test that the value is in range of unsigned int?
>
> The method is correct but a bit unoptimal. I may be wrong, but _x_ is signed variable and may contain negative value that fits _logic_and_ (like ~0xFF00)
All right, let me just blindly cast to "unsigned int" then. If this is the problem in ARM32, it can be fixed by follow-up bug. See new commit.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7080
More information about the hotspot-compiler-dev
mailing list