[jdk17] RFR: 8269820: C2 PhaseIdealLoop::do_unroll get wrong opaque node

Hui Shi hshi at openjdk.java.net
Sat Jul 3 03:22:09 UTC 2021


In PhaseIdealLoop::is_canonical_loop_entry check, opaque node can be at either input of compare node, after is_canonical_loop_entry check, opaq node is getting only from compare node's in(2). This might get wrong oqaque node and cause crash/assertion.  Detailed crash and analysis is in JBS.

Fix: Adding method PhaseIdealLoop::get_opaque_from_cmp, getting opaque node from cmp node's either input.

Test: Linux X64 tier1/2/3 release/fastdebug no regression.

After this fix, BoolNode::Ideal might remove its code forbidding swapping compare node's input node order when second one is opaque1 node.

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

Commit messages:
 - 8269820: C2 PhaseIdealLoop::do_unroll get wrong opaque node

Changes: https://git.openjdk.java.net/jdk17/pull/208/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=208&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8269820
  Stats: 81 lines in 4 files changed: 70 ins; 5 del; 6 mod
  Patch: https://git.openjdk.java.net/jdk17/pull/208.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/208/head:pull/208

PR: https://git.openjdk.java.net/jdk17/pull/208


More information about the hotspot-compiler-dev mailing list