RFR: 8265767: compiler/eliminateAutobox/TestIntBoxing.java crashes on arm32 after 8264649 in debug VMs [v2]

Hui Shi hshi at openjdk.java.net
Sun May 2 00:50:14 UTC 2021


> 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

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3818/files
  - new: https://git.openjdk.java.net/jdk/pull/3818/files/cfc353ed..f25b3838

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3818&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3818&range=00-01

  Stats: 22 lines in 2 files changed: 1 ins; 0 del; 21 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3818.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3818/head:pull/3818

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


More information about the hotspot-compiler-dev mailing list