RFR: 8280123: C2: Infinite loop in CMoveINode::Ideal during IGVN [v2]

Vladimir Ivanov vlivanov at openjdk.java.net
Thu Jan 20 11:26:27 UTC 2022


> 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

Vladimir Ivanov has updated the pull request incrementally with one additional commit since the last revision:

  Cleanups

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7133/files
  - new: https://git.openjdk.java.net/jdk/pull/7133/files/d29bbdd1..5bcc1928

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

  Stats: 12 lines in 2 files changed: 5 ins; 3 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7133.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7133/head:pull/7133

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


More information about the hotspot-compiler-dev mailing list