Re: [Ping] [PATCH, 10/10] aarch64: Handle ccmp in ifcvt to make it work with cmov

2014-10-27 Thread Richard Henderson
On 10/27/2014 12:50 AM, Zhenqiang Chen wrote: > Good point. It is not ccmp special. It is cbranchcc4 related. If I > understand correct, without cbranchcc4, we need put the result to a tmp > register and generate additional compares, which is not good for > performance. It won't be an additional

RE: [Ping] [PATCH, 10/10] aarch64: Handle ccmp in ifcvt to make it work with cmov

2014-10-27 Thread Zhenqiang Chen
> -Original Message- > From: Richard Henderson [mailto:r...@redhat.com] > Sent: Sunday, October 12, 2014 5:40 AM > To: Zhenqiang Chen; gcc-patches@gcc.gnu.org > Subject: Re: [Ping] [PATCH, 10/10] aarch64: Handle ccmp in ifcvt to make it > work with cmov > >

Re: [Ping] [PATCH, 10/10] aarch64: Handle ccmp in ifcvt to make it work with cmov

2014-10-11 Thread Richard Henderson
On 09/22/2014 11:46 PM, Zhenqiang Chen wrote: > @@ -2375,10 +2387,21 @@ noce_get_condition (rtx_insn *jump, rtx_insn > **earliest, bool then_else_reversed >return cond; > } > > + /* For conditional compare, set ALLOW_CC_MODE to TRUE. */ > + if (targetm.gen_ccmp_first) > +{ >

[Ping] [PATCH, 10/10] aarch64: Handle ccmp in ifcvt to make it work with cmov

2014-09-22 Thread Zhenqiang Chen
10/10] aarch64: Handle ccmp in ifcvt to make it work > with cmov > > Andrew, > > Thanks for the input. Patch is updated with your codes. In addition, add > "cstorecc4" and 4 test cases. So it can optimized the following example > > int foo (int a, int b) > { &

Re: [PATCH, 10/10] aarch64: Handle ccmp in ifcvt to make it work with cmov

2014-07-03 Thread Zhenqiang Chen
Andrew, Thanks for the input. Patch is updated with your codes. In addition, add "cstorecc4" and 4 test cases. So it can optimized the following example int foo (int a, int b) { return a > 0 && b < 7; } to: cmpw0, wzr ccmpw1, #6, #9, gt csetw0, le Bootstrap and no make

Re: [PATCH, 10/10] aarch64: Handle ccmp in ifcvt to make it work with cmov

2014-06-23 Thread pinskia
> On Jun 23, 2014, at 12:37 AM, Zhenqiang Chen > wrote: > >> On 23 June 2014 15:09, Andrew Pinski wrote: >> On Mon, Jun 23, 2014 at 12:01 AM, Zhenqiang Chen >> wrote: >>> Hi, >>> >>> The patch enhances ifcvt to handle conditional compare instruction >>> (ccmp) to make it work with cmov. For

Re: [PATCH, 10/10] aarch64: Handle ccmp in ifcvt to make it work with cmov

2014-06-23 Thread Zhenqiang Chen
On 23 June 2014 15:09, Andrew Pinski wrote: > On Mon, Jun 23, 2014 at 12:01 AM, Zhenqiang Chen > wrote: >> Hi, >> >> The patch enhances ifcvt to handle conditional compare instruction >> (ccmp) to make it work with cmov. For ccmp, ALLOW_CC_MODE is set to >> TRUE when calling canonicalize_conditio

Re: [PATCH, 10/10] aarch64: Handle ccmp in ifcvt to make it work with cmov

2014-06-23 Thread Andrew Pinski
On Mon, Jun 23, 2014 at 12:09 AM, Andrew Pinski wrote: > On Mon, Jun 23, 2014 at 12:01 AM, Zhenqiang Chen > wrote: >> Hi, >> >> The patch enhances ifcvt to handle conditional compare instruction >> (ccmp) to make it work with cmov. For ccmp, ALLOW_CC_MODE is set to >> TRUE when calling canonicali

Re: [PATCH, 10/10] aarch64: Handle ccmp in ifcvt to make it work with cmov

2014-06-23 Thread Andrew Pinski
On Mon, Jun 23, 2014 at 12:01 AM, Zhenqiang Chen wrote: > Hi, > > The patch enhances ifcvt to handle conditional compare instruction > (ccmp) to make it work with cmov. For ccmp, ALLOW_CC_MODE is set to > TRUE when calling canonicalize_condition. And the backend does not > need to generate additio

[PATCH, 10/10] aarch64: Handle ccmp in ifcvt to make it work with cmov

2014-06-23 Thread Zhenqiang Chen
Hi, The patch enhances ifcvt to handle conditional compare instruction (ccmp) to make it work with cmov. For ccmp, ALLOW_CC_MODE is set to TRUE when calling canonicalize_condition. And the backend does not need to generate additional "compare (CC, 0)" for it. Bootstrap and no check regression on