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] Fold X/C1 < C2 also for EXACT_DIV_EXPR


On Sun, 9 Jan 2005, Falk Hueffner wrote:
> 2005-01-08  Falk Hueffner  <falk@debian.org>
>
> 	* fold-const.c (fold): Also handle EXACT_DIV_EXPR when folding
> 	X/C1 cmpop C2.
>

This is OK for mainline.

In theory, we could do a bit better for EXACT_DIV_EXPR, i.e. X/C1 == C2
can be optimized to "X == C1*C2" for EXACT_DIV_EXPR, but requires a range
test for TRUNC_DIV_EXPR.  But this would require tweaking fold_div_compare
which I'm not sure would be suitable during stage3.

Thanks,

Roger
--


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