x86_64: Optimize AbsI and AbsL

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 21
    • Affects Version/s: 21
    • Component/s: hotspot
    • b19
    • x86

      Currently, abs nodes are implemented using the sequence:

          mov tmp, src
          sar tmp, 31
          mov dst, src
          xor dst, tmp
          sub dst, tmp

      This can be optimized into:

          xor dst, dst
          sub dst, src
          cmovl dst, src

      This saves 2 instructions and 1 temp register.

            Assignee:
            Quan Anh Mai
            Reporter:
            Quan Anh Mai
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: