RFR: 8343137: C2: VerifyLoopOptimizations fails with "Was reachable in only one"
Vladimir Kozlov
kvn at openjdk.org
Mon Oct 28 17:58:16 UTC 2024
On Mon, 28 Oct 2024 12:42:40 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> [JDK-8342043](https://bugs.openjdk.org/browse/JDK-8342043) introduced a new usage of `igvn.intcon()` but missed to call `set_ctrl()`. This simple patch fixes this.
>>
>> While working on this, I've noticed that a few Assertion Predicates tests ended up in the `predicates` directory while they would have better been placed into `predicates/assertion`. It's probably not worth to file a separate issue just for that, so I've squeezed this trivial move into this fix. Note that `AssertionPredicateDoesntConstantFold` does not define a package and thus does not need an update to the command line.
>>
>> Thanks,
>> Christian
>
> src/hotspot/share/opto/loopnode.cpp line 4492:
>
>> 4490: if (!useful_predicates.member(opaque_node)) { // not in the useful list
>> 4491: ConINode* one = _igvn.intcon(1);
>> 4492: set_ctrl(one, C->root());
>
> Noticed that we find this pattern quite often in our code. Would be nice to have a `PhaseIdealLoop::intcon()` which calls `igvn.intcon()` and takes care of setting ctrl. I filed [JDK-8343148](https://bugs.openjdk.org/browse/JDK-8343148) to keep track of that.
Agree.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21739#discussion_r1819505737
More information about the hotspot-compiler-dev
mailing list