RFR: 8280003: C1: Reconsider uses of logical_and immediates in LIRGenerator::do_getObjectSize [v3]

Sergey Nazarkin snazarki at openjdk.java.net
Tue Jan 18 19:16:24 UTC 2022


On Tue, 18 Jan 2022 15:37:05 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Thanks, reproduced on ARM32 with:
>> 
>> make run-test TEST=java/lang/instrument/GetObjectSizeIntrinsicsTest.java TEST_VM_OPTS="-XX:+TieredCompilation"
>
> I think I nailed the problem: I think `logical_and` is 32-bit only on ARM32. Feeding `jlong` there wrecks up the intrinsic logic. Luckily, we don't need `jlong` there, we can do it completely in `jint` domain, and then convert the result to `jlong` for return. This better matches what C2 does for 32-bit code. New commit passes tests on all platforms for me.

Verified with the test. Hovewer the problem with logic_and should be investigated separately, since arm c1 assembler supports AND on 64bits values.

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

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


More information about the hotspot-compiler-dev mailing list