This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch]: Enhance rtl-dse to remove unaligned read after writes.
- From: Kenneth Zadeck <zadeck at naturalbridge dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Ian Lance Taylor <iant at google dot com>, "Christopher, Eric" <echristo at gmail dot com>
- Date: Fri, 06 Jul 2007 15:07:35 -0400
- Subject: Re: [patch]: Enhance rtl-dse to remove unaligned read after writes.
- References: <468E5141.5080804@naturalbridge.com> <468E560F.1040406@gnu.org>
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