In the review of JDK-8324655, I was suggested to look at some min/max node identities. I've found that we can simplify constructs such as 'Max(a, Max(a, b))' to 'Max(a, b)', and 'Max(a, Min(a, b))' to just 'a' for ints and longs. We can also statically return the smaller/larger node based on the type info for MinI and MaxI, like we do for MinL and MaxL.
These patterns can be created during the compilation process by loop optimizations, especially with MinL/MaxL.
These patterns can be created during the compilation process by loop optimizations, especially with MinL/MaxL.
- links to
-
Commit(master) openjdk/jdk/29d648c6
-
Review(master) openjdk/jdk/21439