Integrated: 8323429: Missing C2 optimization for FP min/max when both inputs are same

Galder Zamarreño galder at openjdk.org
Wed Apr 24 08:23:37 UTC 2024


On Thu, 11 Apr 2024 12:10:38 GMT, Galder Zamarreño <galder at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: c439c8c7
Author:    Galder Zamarreño <galder at openjdk.org>
Committer: Andrew Dinn <adinn at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/c439c8c73cf07966e3517ecbaf14d79dcbaeabb3
Stats:     189 lines in 5 files changed: 187 ins; 0 del; 2 mod

8323429: Missing C2 optimization for FP min/max when both inputs are same

Reviewed-by: roland, chagedorn

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

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


More information about the hotspot-compiler-dev mailing list