optimization/8165: builtin string functions SEGV on alpha-pc-linux-gnu at -O2

Glen Nakamura glen@imodulo.com
Tue Oct 8 16:16:00 GMT 2002


The following reply was made to PR optimization/8165; it has been noted by GNATS.

From: Glen Nakamura <glen@imodulo.com>
To: Richard Henderson <rth@redhat.com>, gcc-gnats@gcc.gnu.org,
	gcc-bugs@gcc.gnu.org
Cc:  
Subject: Re: optimization/8165: builtin string functions SEGV on alpha-pc-linux-gnu at -O2
Date: Tue, 8 Oct 2002 13:13:26 -1000

 On Tue, Oct 08, 2002 at 03:20:53PM -0700, Richard Henderson wrote:
 > I get the feeling this is simply papering over the problem.
 > I'll continue to investigate...
 
 Thanks, you are quite possibly right.
 
 There was a bunch of things happening, and I don't fully understand
 the semantics of REG_EQUAL notes.  I don't have the original rtx dumps,
 but from memory things looked like this before gcse:
 
 SET A
 ...
 BEGIN_LOOP
 ...
 SET B
 USE B REG_EQUAL B
 
 After gcse USE B is replaced with USE A, but REG_EQUAL still refers to B:
 
 SET A
 ...
 BEGIN_LOOP
 ...
 SET B
 USE A REG_EQUAL B
 
 Then I think the loop pass moved USE A out of the loop (above SET B):
 
 SET A
 ...
 USE A REG_EQUAL B
 BEGIN_LOOP
 ...
 SET B
 
 Eventually, SET B is determined dead and removed but the REG_EQUAL
 referring to it still exists... Then for some reason, the REG_EQUAL note
 gets used and bad things happen.  One bad side-effect is that life-analysis
 determines B is live at the entry of basic block 0.  I hope this helps.
 
 - glen



More information about the Gcc-prs mailing list