llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

AArch64: EON instruction not selected efficiently

Open jmolloy opened this issue 11 years ago • 1 comments

Bugzilla Link 22751
Resolution FIXED
Resolved on Jul 20, 2015 13:43
Version trunk
OS All

Extended Description

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 #&#8203;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.

jmolloy avatar Mar 02 '15 15:03 jmolloy

Committed revision 242694.

llvmbot avatar Jul 20 '15 20:07 llvmbot