On 12/04/2014 05:16 PM, Zhenqiang Chen wrote:
> +static rtx
> +cc_in_cond (rtx cond)
> +{
> +  if ((HAVE_cbranchcc4) && cond

Silly parens around the HAVE_cbranchcc4.

> +      && (GET_MODE_CLASS (GET_MODE (XEXP (cond, 0))) == MODE_CC))

More silly parens around the ==.

> +  /* Skip it if the instruction to be moved might clobber CC.  */
> +  cc = cc_in_cond (cond);
> +  if (cc)
> +    if (set_of (cc, insn_a)
> +     || (insn_b && set_of (XEXP (cond, 0), insn_b)))
> +      return FALSE;

Don't nest if's when an && will do; if the && won't do, always use braces.

It looks like the insn_b test can be simpler, since the non-null return from
cc_in_cond is always XEXP (cond, 0).

So:

  if (cc
      && (set_of (cc, insn_a)
          || (insn_b && set_of (cc, insn_b)))
    return FALSE;

Ok with those changes.


r~

Reply via email to