RFR: 8280003: C1: Reconsider uses of logical_and immediates in LIRGenerator::do_getObjectSize [v3]
Aleksey Shipilev
shade at openjdk.java.net
Tue Jan 18 15:40:27 UTC 2022
On Tue, 18 Jan 2022 10:10:47 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> It's my fault, sorry, I forget to add you need to enable TieredCompilation explicitly, e.g.
>> `jtreg6.1/bin/jtreg -v1 -javaoptions:-XX:+TieredCompilation test/jdk/java/lang/instrument/GetObjectSizeIntrinsicsTest.java`
>
> 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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7080
More information about the hotspot-compiler-dev
mailing list