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: Fold ABS_EXPR < 0, pr14303/pr15784


Roger Sayle <roger@eyesopen.com> writes:

> On 12 Feb 2005, James A. Morrison wrote:
> > 2005-02-11  James A. Morrison  <phython@gcc.gnu.org>
> >
> >	PR tree-optimization/14303
> >	PR tree-optimization/15784
> >	* fold-const.c (fold): Fold ABS_EXPR<x> >= 0 to true, when
> >	possible.
> >	Fold ABS_EXPR<x> < 0 to false.  Fold ABS_EXPR<x> == 0 to x == 0
> >	and ABS_EXPR<x> != 0 to x != 0.
> 
> This is OK for mainline.  As a follow-up patch, you might consider the
> use of omit_one_operand to perform these transformations even if x
> has side-effects.  For example, your third transformation is safe even
> if arg0 has side-effects.
> 
> Thanks,
> 
> Roger
> --
> 

 Thanks, I'll look into it.

-- 
Thanks,
Jim

http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim


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