On Tue, May 1, 2012 at 9:45 AM, Richard Henderson <r...@redhat.com> 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): Disallow comparison
>> modes of DImode for 32bits and TImode.
>
>
> Looks ok, modulo some unwrapped long lines.
> Those lines might not be so long if this were split out as a subroutine...
>
> I'll not quibble about that though...

Here is a new patch which splits this out into a subroutine which
reduces the long lines.  I added some extra comments that might make
some stuff like the extra can_conditionally_move_p check.

OK?  Bootstrapped and tested on x86_64-linux-gnu.

Thanks,
Andrew Pinski

ChangeLog:
* expr.c (get_def_for_expr_class): New function.
(convert_tree_comp_to_rtx): New function.
(expand_cond_expr_using_cmove): New function.
(expand_expr_real_2 <case COND_EXPR>): Call
expand_cond_expr_using_cmove first and return if it succeeds.
Remove the check for HAVE_conditional_move since we should have
already converted it to a conditional move.

* config/i386/i386.c (ix86_expand_int_movcc): Disallow comparison
modes of DImode for 32bits and TImode.

Reply via email to