llvm-project
llvm-project copied to clipboard
AArch64: EON instruction not selected efficiently
| 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 #​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.
Committed revision 242694.