[LLVMbugs] [Bug 22751] New: AArch64: EON instruction not selected efficiently

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 2 05:55:41 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22751

            Bug ID: 22751
           Summary: AArch64: EON instruction not selected efficiently
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: james.molloy at arm.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following code snippet should produce an EON instruction in both A64 and
A32:

unsigned long
f(unsigned long a, unsigned long b, unsigned long c) {
  return (a ^ ~(b << 4));
}

On A64 and A32, we get two instructions produced:

    eor    x8, x0, x1, lsl #4
    mvn     x0, x8

I think this is because SDAG canonicalises the expression into "~(a ^ b << 4)",
which we don't recognize as a pattern for EON.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150302/427b623a/attachment.html>


More information about the llvm-bugs mailing list