Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8341781

Improve Min/Max node identities

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 24
    • hotspot
    • b02

      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.

            jkarthikeyan Jasmine Karthikeyan
            jkarthikeyan Jasmine Karthikeyan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: