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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to