RFR: 8265767: compiler/eliminateAutobox/TestIntBoxing.java crashes on arm32 after 8264649 in debug VMs [v2]
Christoph Göttschkes
cgo at openjdk.java.net
Mon May 3 06:33:54 UTC 2021
On Sun, 2 May 2021 00:50:14 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
>
> Hui Shi has updated the pull request incrementally with one additional commit since the last revision:
>
> Use PhaseIterGVN ptr as LoadNode::eliminate_autobox method parameter for simiplification and add comments for previous commit
Thanks for looking into this issue.
I am currently testing on an ARMv7-A target, and `compiler/eliminateAutobox/TestIntBoxing.java` is passing now . The whole hotspot tier1 suite will take some time, so I will report back later today, or tomorrow.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3818
More information about the hotspot-compiler-dev
mailing list