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 PR23109


On Fri, Jul 29, 2005 at 11:00:07AM +0200, Richard Guenther wrote:
> But
> 
>   z = a/b + c/b;
> 
> traps two times, while
> 
>   d = 1/b;
>   z = a*d + b*d;
> 
> traps only one time.  Is this a valid transformation then?

IMO, yes: -ftrapping-math does not *preserve* traps, merely does
not *add* any that would not be otherwise taken.  The converse is
-fno-trapping-math, which means that there are never any traps to
worry about.


r~


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