RFR: 8343068: C2: CastX2P Ideal transformation not always applied [v3]

Roland Westrelin roland at openjdk.org
Tue Nov 5 12:21:52 UTC 2024


> The transformation:
> 
> 
> (CastX2P (AddL base i)) -> (AddP (CastX2P base) i) 
> 
> 
> when i fits in an int is not always applied: when the type of `i` is
> narrowed so it fits in an int, the `CastX2P` is not enqueued for
> igvn. This can get in the way of vectorization as shown by test case
> `test2`.

Roland Westrelin has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Merge branch 'master' into JDK-8343068
 - fix test
 - test & fix

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/21714/files
  - new: https://git.openjdk.org/jdk/pull/21714/files/12a471f0..31b4cdde

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=21714&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21714&range=01-02

  Stats: 174646 lines in 1487 files changed: 23955 ins; 144716 del; 5975 mod
  Patch: https://git.openjdk.org/jdk/pull/21714.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21714/head:pull/21714

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


More information about the hotspot-compiler-dev mailing list