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

Optimize abs operations in C2 compiler

XMLWordPrintable

    • 16
    • b06
    • generic
    • generic

      In current SLP, the vectorization of Math.abs() with char type is intentionally disabled after JDK-8261022 because it generates incorrect result before.

      But in Java semantics, as the char type is always non-negative, we could actually translate Math.abs(char) to a no-op by adding a no-op IR and matching rules somehow.

      We can consider re-enable Math.abs() vectorization with char type.

            pli Pengfei Li
            pli Pengfei Li
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: