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

AArch64: Combine add/sub with comparison against zero

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 14
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      aarch64
    • OS:
      linux

      Description

      For Java code block like "if (a + b > 0) {...}", currently add+cmp instructions are generated.
        add w10, w2, w1
        cmp w10, #0x0
        b.gt 0x0000ffff790d5274
      Indeed, these two instructions can be combined into "cmn w2, w1" (alias of adds); sub+cmp can be combined into a single cmp (alias of subs) as well.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: