RFR: 8367690: C2: Unneeded branch in reduce_phi

Anton Seoane Ampudia aseoane at openjdk.org
Tue Oct 21 09:03:24 UTC 2025


This PR carries out a minor cleanup found in the Phi reduction code.

The combination of the branch and assert is redundant as the assert will always trigger. We can either remove the `else if` branch or change the assert for a `ShouldNotReachHere`.

I have gone for the former option here.

**Testing:** passes tiers 1-3

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

Commit messages:
 - Merge branch 'openjdk:master' into JDK-8367690
 - Merge branch 'openjdk:master' into JDK-8367690
 - Cleanup

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

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


More information about the hotspot-compiler-dev mailing list