Identify integer minimum and maximum patterns created with if statements

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 23
    • Affects Version/s: 21, 23
    • Component/s: hotspot
    • b16

        The code patterns "a > b ? a : b" and "if (a > b) b = a" are fairly common in Java code. Currently, the compiler doesn't transform these patterns into minimum and maximum nodes, but such a transformation would compact the IR and allow for other optimizations, such as vectorization.

              Assignee:
              Jasmine Karthikeyan
              Reporter:
              Jasmine Karthikeyan
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: