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: [PATCH] pr70890, r235660 miscompiles stage2


Resending with compressed dumps.

On Tue, May 03, 2016 at 01:07:12PM +0200, Bernd Schmidt wrote:
> On 05/03/2016 12:45 PM, Alan Modra wrote:
> >	PR rtl-optimization/70890
> >	* ira.c (combine_and_move_insns): When moving def_insn, remove
> >	equivs on use_insn.
> 
> I'm not sure yet, but it looks to me like this tweaks the wrong place.
> 
> >diff --git a/gcc/ira.c b/gcc/ira.c
> >index a38e67e..cf5be35 100644
> >--- a/gcc/ira.c
> >+++ b/gcc/ira.c
> >@@ -3742,6 +3742,16 @@ combine_and_move_insns (void)
> >  	  if (use_insn == BB_HEAD (use_bb))
> >  	    BB_HEAD (use_bb) = new_insn;
> >
> >+	  /* Since regno now dies in use_insn we can't leave any
> >+	     equivalence for a reg set by use_insn as the equivalence
> >+	     must reference regno.  */
> 
> "now dies" is the first part that I stumbled over. Doesn't it die there
> regardless of the move?

Yes, but DF doesn't seem to see that..  If the def insn was left in
its original bb we have the reg live practically everywhere.  Search
for "DI 1381" in attached pre-patch dumps.

> And if it dies, why did we make this equivalence in
> the first place? It seems we should fix the place that makes incorrect
> equivalences rather than removing them here (where it seems likely we'll
> catch only a partial set).

The thing is that before the insn is moved we don't see the reg as
dead, and the equiv therefore is reasonable, I think.

-- 
Alan Modra
Australia Development Lab, IBM

Attachment: tree-sra.part.dump.tar.xz
Description: Binary data


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