Re: [PATCH] Try to expand COND_EXPR using addcc

2012-05-22 Thread Richard Henderson
On 05/16/2012 12:48 PM, Andrew Pinski wrote: + /* Handle 0/1 specially because boolean types and precision of one types, + will cause the diff to always be 1. Note this really should have + simplified before reaching here. */ + /* A ? 1 : 0 is just (type)(A!=0). */ + if (integer_zero

[PATCH] Try to expand COND_EXPR using addcc

2012-05-16 Thread Andrew Pinski
Hi, This is just like my previous patch to expand COND_EXPR using conditional moves but this time using addcc instead. I had to fix a bug in emit_conditional_add where it was swapping op2 and op3 which can never happen. Also the documentation for both emit_conditional_add and add@var{mode}cc was