> The problem this patch fixes is that combine_simplify_rtx() prefers to
> return an expression (say, <xor (a) (b)>) even when a comparison is
> prefered (say, <neq (xor (a) (b)) 0>).  Expressions are not recognized as
> valid conditions of if_then_else for most targets, so combiner misses a
> potential optimization.  This patch makes combine_simplify_rtx() aware of
> the context it was invoked in, and, when appropriate, does not discourage
> it from returning a conditional.

Btw, this is very likely also valid for targets with STORE_FLAG_VALUE == -1 so 
the same IN_COND short-circuit would need to be added a few lines below in 
combine_simplify_rtx.  But this would need to be tested.  Do you happen to 
have access to such a target, e.g. m68k?

-- 
Eric Botcazou

Reply via email to