Re: [PATCH][AArch64] Use cinc for if_then_else of plus-immediates

2015-07-20 Thread Kyrill Tkachov
On 19/07/15 07:40, Oleg Endo wrote: On 19 Jul 2015, at 12:13, Andrew Pinski wrote: On Thu, Jul 16, 2015 at 8:33 AM, Kyrill Tkachov wrote: Hi all, This patch improves codegen for expressions of the form: (x ? y + c1 : y + c2) when |c1 - c2| == 1 It matches the if_then_else of the two plus-

Re: [PATCH][AArch64] Use cinc for if_then_else of plus-immediates

2015-07-18 Thread Oleg Endo
On 19 Jul 2015, at 12:13, Andrew Pinski wrote: > On Thu, Jul 16, 2015 at 8:33 AM, Kyrill Tkachov > wrote: >> Hi all, >> >> This patch improves codegen for expressions of the form: >> (x ? y + c1 : y + c2) when |c1 - c2| == 1 >> >> It matches the if_then_else of the two plus-immediates, >> pe

Re: [PATCH][AArch64] Use cinc for if_then_else of plus-immediates

2015-07-18 Thread Andrew Pinski
On Thu, Jul 16, 2015 at 8:33 AM, Kyrill Tkachov wrote: > Hi all, > > This patch improves codegen for expressions of the form: > (x ? y + c1 : y + c2) when |c1 - c2| == 1 > > It matches the if_then_else of the two plus-immediates, > performs one of them, then generates a conditional increment > ope

[PATCH][AArch64] Use cinc for if_then_else of plus-immediates

2015-07-16 Thread Kyrill Tkachov
Hi all, This patch improves codegen for expressions of the form: (x ? y + c1 : y + c2) when |c1 - c2| == 1 It matches the if_then_else of the two plus-immediates, performs one of them, then generates a conditional increment operation. Thus, for the code in the testcase we generate a single add,