Re: [PATCH] Improve COND_EXPR expansion

2012-05-04 Thread Richard Henderson
On 05/04/12 00:30, Andrew Pinski wrote: > +static rtx > +expand_cond_expr_using_cmove (tree treeop0, tree treeop1, tree treeop2) > +{ > +#ifdef HAVE_conditional_move You'll need ATTRIBUTE_UNUSED markers here. Otherwise ok. r~

Re: [PATCH] Improve COND_EXPR expansion

2012-05-04 Thread Andrew Pinski
On Fri, May 4, 2012 at 12:29 AM, Andrew Pinski wrote: > On Tue, May 1, 2012 at 9:45 AM, Richard Henderson wrote: >> On 04/30/2012 08:22 PM, Andrew Pinski wrote: >>> >>> * expr.c (convert_tree_comp_to_rtx): New function. >>> (expand_expr_real_2): Try using conditional moves for COND_EXPRs if they

Re: [PATCH] Improve COND_EXPR expansion

2012-05-04 Thread Andrew Pinski
On Tue, May 1, 2012 at 9:45 AM, Richard Henderson wrote: > On 04/30/2012 08:22 PM, Andrew Pinski wrote: >> >> * expr.c (convert_tree_comp_to_rtx): New function. >> (expand_expr_real_2): Try using conditional moves for COND_EXPRs if they >> exist. >> * config/i386/i386.c (ix86_expand_int_movcc): Di

Re: [PATCH] Improve COND_EXPR expansion

2012-05-02 Thread William J. Schmidt
On Mon, 2012-04-30 at 20:22 -0700, Andrew Pinski wrote: > Hi, > This patch improves the expansion of COND_EXPR into RTL, directly > using conditional moves. > I had to fix a bug in the x86 backend where emit_conditional_move > could cause a crash as we had a comparison mode of DImode which is not

Re: [PATCH] Improve COND_EXPR expansion

2012-05-01 Thread Richard Henderson
On 04/30/2012 08:22 PM, Andrew Pinski wrote: * expr.c (convert_tree_comp_to_rtx): New function. (expand_expr_real_2): Try using conditional moves for COND_EXPRs if they exist. * config/i386/i386.c (ix86_expand_int_movcc): Disallow comparison modes of DImode for 32bits and TImode. Looks ok, modu

[PATCH] Improve COND_EXPR expansion

2012-04-30 Thread Andrew Pinski
Hi, This patch improves the expansion of COND_EXPR into RTL, directly using conditional moves. I had to fix a bug in the x86 backend where emit_conditional_move could cause a crash as we had a comparison mode of DImode which is not handled by the 32bit part. can_conditionally_move_p return true