RFR: 8323429: Missing C2 optimization for FP min/max when both inputs are same [v3]

Galder Zamarreño galder at openjdk.org
Wed Apr 17 11:08:01 UTC 2024


> Added C2 identity optimization for min/max calls, whereby if both inputs are the same, either is returned.
> 
> It includes an IR test to verify that the optimization gets applied. The optimization applies not only to floating points, but also long and ints. The test includes tests for all of those.
> 
> `BasicDoubleOpTest.vectorMax_8322090` has also been adjusted to match expectations after implementing the optimization.
> 
> I've run hotspot compiler tests successfully on x86_64.

Galder Zamarreño has updated the pull request incrementally with one additional commit since the last revision:

  Use failOn instead of counts

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/18738/files
  - new: https://git.openjdk.org/jdk/pull/18738/files/f3d20ced..7f6e4b5e

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

  Stats: 8 lines in 1 file changed: 0 ins; 0 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/18738.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18738/head:pull/18738

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


More information about the hotspot-compiler-dev mailing list