[patch]: Enhance rtl-dse to remove unaligned read after writes.

Kenneth Zadeck zadeck@naturalbridge.com
Fri Jul 6 19:36:00 GMT 2007


Paolo Bonzini wrote:
> +      target = expand_binop (new_mode, lshr_optab, new_reg,
> +                 GEN_INT (shift), new_reg, 1, OPTAB_DIRECT);
> +
> +      /* If the target is NULL, there was no way to do this, if the
> +     target is not equal to new_reg, then it had to add an extra
> +     move.  In either case, we fall back and try the arithmetic
> +     shift of this size to see if we get lucky there.  */
> +      if (target != new_reg)
> +    target = expand_binop (new_mode, ashr_optab, new_reg,
> +                   GEN_INT (shift), new_reg, 1, OPTAB_DIRECT);
>
> I guess you are missing and end_sequence/start_sequence pair to
> discard the result of expanding with lshr_optab.
>
> Paolo
you are right,
That is certainly going to be a hard path to test, it is there in case
lshr is expensive and ashr is cheap.  i do not know if such a machine
exists.

kenny



More information about the Gcc-patches mailing list