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] Fix PR optimization/13653


> 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?


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