Integrated: 8265767: compiler/eliminateAutobox/TestIntBoxing.java crashes on arm32 after 8264649 in debug VMs
Hui Shi
hshi at openjdk.java.net
Tue May 4 13:01:55 UTC 2021
On Fri, 30 Apr 2021 14:17:23 GMT, Hui Shi <hshi at openjdk.org> wrote:
> This patch fix failure exposed by JDK-8264649.
>
> compiler/eliminateAutobox/TestIntBoxing.java crashes on arm32 in Compile::check_no_dead_use assertion.
> In LoadNode::eliminate_autobox, early "result" is dead after line 1450 but not added into PhaseGVN worklist for optimization.
> Its out_cnt is 0. If it isn't removed, will trigger assertion in Compile::check_no_dead_use.
>
>
> 1443 } else if (result->is_Add() && result->in(2)->is_Con() &&
> 1444 result->in(1)->Opcode() == Op_LShiftX &&
> 1445 result->in(1)->in(2) == phase->intcon(shift)) {
> 1446 // We can't do general optimization: ((X<<Z) + Y) >> Z ==> X + (Y>>Z)
> 1447 // but for boxing cache access we know that X<<Z will not overflow
> 1448 // (there is range check) so we do this optimizatrion by hand here.
> 1449 Node* add_con = new RShiftXNode(result->in(2), phase->intcon(shift));
> --- result before is dead and might not removed
> 1450 result = new AddXNode(result->in(1)->in(1), phase->transform(add_con));
> 1451 } else
>
>
> Detail analysis is in https://bugs.openjdk.java.net/browse/JDK-8265767
>
> @mychris I have verified compiler/eliminateAutobox/TestIntBoxing.java on qemu, it failed with same assertion and now passes with this fix. Would you please help verify it on arm32 machine?
>
> Testing:
> - Passed Tier1-3 on Linux x86_64, release and fastdebug build, default option and -XX:-TieredCompilation.
> - compiler/eliminateAutobox/TestIntBoxing.java on arm32 release/fastdebug/slowdebug
This pull request has now been integrated.
Changeset: ee5bba0d
Author: Hui Shi <hshi at openjdk.org>
Committer: Tobias Hartmann <thartmann at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/ee5bba0dc4cc7c2bfe633c5a3fe731c6c37adb1d
Stats: 22 lines in 2 files changed: 3 ins; 0 del; 19 mod
8265767: compiler/eliminateAutobox/TestIntBoxing.java crashes on arm32 after 8264649 in debug VMs
Reviewed-by: kvn, thartmann
-------------
PR: https://git.openjdk.java.net/jdk/pull/3818
More information about the hotspot-compiler-dev
mailing list