RFR: 8280123: C2: Infinite loop in CMoveINode::Ideal during IGVN
Vladimir Ivanov
vlivanov at openjdk.java.net
Thu Jan 20 11:26:28 UTC 2022
On Tue, 18 Jan 2022 18:57:02 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> There's a discrepancy between `CMoveNode::Ideal()` and `CMoveINode::Ideal()` in the way how constants are detected:
> the former looks for `Con` nodes (`in(IfFalse)->is_Con()`) while the latter checks node types (e.g., `phase->type(in(IfFalse)) == TypeInt::ZERO`). It leads to infinite loop during IGVN (where `CMoveNode::Ideal()` and `CMoveINode::Ideal()` repeatedly rotate `CMoveI` node) because `CMoveNode::Ideal()` don't consider `CastII` to a constant as a constant while `CMoveINode::Ideal()` does.
>
> The fix migrates `CMoveNode::Ideal()` away from `Node::is_Con()` to node types.
>
> Testing: hs-tier1 - hs-tier4
Thanks for the reviews, Vladimir, Tobias, and Christian.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7133
More information about the hotspot-compiler-dev
mailing list