[patch] Fix some pessimizations due to fixes for PRs 27144 and 27639

Daniel Berlin dberlin@dberlin.org
Wed Jun 14 23:05:00 GMT 2006


Zdenek Dvorak wrote:
> Hello,
> 
> with the fix for PR 27639, in some cases where we previously believed
> folding a cast of the chrec is possible, we now know that this is not
> the case.  One important case is this:
....


> 
> 	* tree-ssa-loop-niter.c (implies_nonnegative_p): New function.
> 	(derive_constant_upper_bound): Derive more precise upper bound in
> 	common cases.  Return type changed to double_int.
> 	(record_estimate): Reflect the changed return type of
> 	derive_constant_upper_bound.
> 	* double-int.c (double_int_zext, double_int_sext): Fix.
> 
> 	* gcc.dg/tree-ssa/loop-18.c: New test.
> 


As this is a partly a fix for a fix, i'm inclined to approve it for 4.2.

I'll defer to whether you believe it is safe for 4.1, so as long you
feel it is safe for 4.2 at this stage, please apply it there.

--Dan



More information about the Gcc-patches mailing list