Re: [PATCH][AArch64] Fix missing optimization for CMP+AND

2017-07-27 Thread James Greenhalgh
On Wed, Mar 29, 2017 at 11:17:20AM +0100, Sudi Das wrote: > > Hi all > > During combine GCC tries to merge CMP (with zero) and AND into a TST. > However, in cases where an ANDS operand is not compatible, this was being > missed. Adding a define_split where this operand was moved to a register > s

[PATCH][AArch64] Fix missing optimization for CMP+AND

2017-03-29 Thread Sudi Das
Hi all During combine GCC tries to merge CMP (with zero) and AND into a TST. However, in cases where an ANDS operand is not compatible, this was being missed. Adding a define_split where this operand was moved to a register seems to help out. For example for a test : int f (unsigned char *p)