C2: Optimize redundant input calculations for sign comparisons

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 27
    • Component/s: hotspot

      When doing sign comparisons (i.e., x < 0; x >= 0), some binary operator input nodes can be skipped, only relying on one input of that node.
      Common patterns like (x | y) < 0 can be simplified to x < 0 if y is known to be nonnegative. Similar optimizations can be made for And, Max, and Min nodes.

      For Xor, a common pattern is (x ^ y) < 0, which can also be simplified but requires a negation of the test depending on the known value.

            Assignee:
            Hannes Greule
            Reporter:
            Hannes Greule
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: