[lworld] RFR: 8271531: [lworld] Implicit null check optimization does not hoist constant load input
Tobias Hartmann
thartmann at openjdk.java.net
Fri Jul 30 07:17:05 UTC 2021
[JDK-8231561](https://bugs.openjdk.java.net/browse/JDK-8231561) added support for hoisting constant load inputs during C2's implicit null check optimization, assuming that it's only required if `!is_decoden`. However, the following `andL` has both a `decodeHeapOop_not_null` val input and a `loadConUL32` that needs to be hoisted:
239 loadConUL32 === 1 [[ 238 ]] #5/0x0000000000000005
245 decodeHeapOop_not_null === _ 208 [[ 246 238 228 250 ]] java/lang/Object:NotNull * ...
238 andL_rReg_mem_0 === 1041 133 245 239 [[ 240 237 ]]
The fix is to simply always check for constant loads inputs that require hoisting.
Best regards,
Tobias
-------------
Commit messages:
- 8271531: [lworld] Implicit null check optimization does not hoist constant load input
Changes: https://git.openjdk.java.net/valhalla/pull/508/files
Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=508&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8271531
Stats: 17 lines in 1 file changed: 0 ins; 0 del; 17 mod
Patch: https://git.openjdk.java.net/valhalla/pull/508.diff
Fetch: git fetch https://git.openjdk.java.net/valhalla pull/508/head:pull/508
PR: https://git.openjdk.java.net/valhalla/pull/508
More information about the valhalla-dev
mailing list