This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Have fold convert -(a/b) to (-a)/b or a/(-b) if a or b are easily negated
- From: Roger Sayle <roger at eyesopen dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 27 Nov 2005 07:09:24 -0700 (MST)
- Subject: Re: [PATCH] Have fold convert -(a/b) to (-a)/b or a/(-b) if a or b are easily negated
On Sat, 26 Nov 2005, Andrew Pinski wrote:
> ChangeLog:
> * fold-const.c (negate_expr_p): Add case for signed divides if overflow
> is undefined.
> (negate_expr): Likewise.
>
> * gcc.dg/tree-ssa/divide-3.c: New test.
> * gcc.dg/tree-ssa/divide-4.c: New test.
This is OK for mainline.
Thanks,
Roger
--