RFR: 8369258: C2: enable ReassociateInvariants for all loop types

Roland Westrelin roland at openjdk.org
Tue Oct 7 07:43:25 UTC 2025


Currently ReassociateInvariants is only enabled for int counted
loops. I noticed, enabling it for long counted loops helps RCE. It
also seems like something that would help any loop. I propose enabling
it for all inner loops.

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

Commit messages:
 - test fixes
 - test and fix

Changes: https://git.openjdk.org/jdk/pull/27666/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27666&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8369258
  Stats: 451 lines in 6 files changed: 255 ins; 190 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/27666.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27666/head:pull/27666

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


More information about the hotspot-compiler-dev mailing list