AArch64: Combine add/sub with comparison against zero

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P4
    • 15
    • Affects Version/s: 14
    • Component/s: hotspot
    • aarch64
    • linux

      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.

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

              Created:
              Updated:
              Resolved: