[PATCH] Fix PR optimization/13653

Joern Rennecke joern.rennecke@superh.com
Tue May 25 17:30:00 GMT 2004


> The problem is in the loop optimizer: if a giv happens to carry the /u flag, 
> is reduced but not replaceable, moves from the new register to the original 
> one with the /u flag are generated, thus breaking the semantics of 
> RTX_UNCHANGING_P.  This is further exacerbated here because the loop is 
> unrolled twice, so an unchanging read from the first loop can be intertwined 
> with an unchanging write from the second loop.
> 
> The proposed fix is to prevent givs that carry the /u flag and are not 
> replaceable from being reduced by the loop optimizer.  Bootstrapped/regtested 
> on i586-redhat-linux-gnu (3.3 branch).  OK for all branches?

Whouldn't it be more straightforward to clear the /u flag for the giv
when strength reduction goes ahead?



More information about the Gcc-patches mailing list