This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [VTA] merge fwprop fix and revert vta workaround
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 29 Apr 2008 16:58:50 -0300
- Subject: Re: [VTA] merge fwprop fix and revert vta workaround
- References: <orwsmh5b2c.fsf@oliva.athome.lsd.ic.unicamp.br>
On Apr 29, 2008, Alexandre Oliva <aoliva@redhat.com> wrote:
> @@ -894,6 +887,9 @@ forward_propagate_and_simplify (struct d
> if (!new)
> return false;
> + if (mode != GET_MODE (new))
> + new = wrap_constant (mode, new);
> +
> return try_fwprop_subst (use, loc, new, def_insn, set_reg_equal);
> }
Err... This is broken. It should only be done for debug insns,
otherwise ppc breaks. I guess I rsynced something the wrong way :-(
Here's the fix I'm installing in the branch.
for gcc/ChangeLog.vta
from Alexandre Oliva <aoliva@redhat.com>
* fwprop.c (forward_propagate_and_simplify): Wrap constants only
in debug insns.
Index: gcc/fwprop.c
===================================================================
--- gcc/fwprop.c.orig 2008-04-29 16:24:28.000000000 -0300
+++ gcc/fwprop.c 2008-04-29 16:24:30.000000000 -0300
@@ -887,7 +887,8 @@ forward_propagate_and_simplify (struct d
if (!new)
return false;
- if (mode != GET_MODE (new))
+ /* Do this only for debug insns, implied by a NULL use_set. */
+ if (!use_set && mode != GET_MODE (new))
new = wrap_constant (mode, new);
return try_fwprop_subst (use, loc, new, def_insn, set_reg_equal);
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
FSFLA Board Member ÂSÃ Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}