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

Optimize abs operations in C2 compiler

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Version:
      16
    • Resolved In Build:
      b06
    • CPU:
      generic
    • OS:
      generic

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pli Pengfei Li
              Reporter:
              pli Pengfei Li
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: