This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [VTA] merge fwprop fix and revert vta workaround


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}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]