Integrated: 8280123: C2: Infinite loop in CMoveINode::Ideal during IGVN
Vladimir Ivanov
vlivanov at openjdk.java.net
Thu Jan 20 11:26:30 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
This pull request has now been integrated.
Changeset: 3f747368
Author: Vladimir Ivanov <vlivanov at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/3f747368b9a5c321d2724ba57103f17edc166251
Stats: 93 lines in 2 files changed: 72 ins; 4 del; 17 mod
8280123: C2: Infinite loop in CMoveINode::Ideal during IGVN
Reviewed-by: kvn, thartmann, chagedorn
-------------
PR: https://git.openjdk.java.net/jdk/pull/7133
More information about the hotspot-compiler-dev
mailing list