RFR: 8330163: C2: improve CMoveNode::Value() when condition is always true or false

Roland Westrelin roland at openjdk.org
Fri Apr 12 11:49:54 UTC 2024


This is another small change from something I ran into while working
on 8275202. `CMoveNode::Value` can be improved when the condition is
known to be always true or false. That doesn't affect IGVN (as the
`CMove` is removed in that case) but it can be useful for passes that
propagates types such as CCP. In the IR tests, the backbranch of the
loop is never taken when the root of the compilation is `test1`. With
the change, CCP can eliminate it. Without, it can't.

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

Commit messages:
 - test & fix

Changes: https://git.openjdk.org/jdk/pull/18757/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18757&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8330163
  Stats: 78 lines in 2 files changed: 78 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/18757.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18757/head:pull/18757

PR: https://git.openjdk.org/jdk/pull/18757


More information about the hotspot-compiler-dev mailing list