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

x86_64: Optimize AbsI and AbsL

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 21
    • 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.

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

              Created:
              Updated:
              Resolved: