This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: convert (long)round(d) -> lround(d), etc
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: roger at eyesopen dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 28 Apr 2004 09:13:54 -0400 (EDT)
- Subject: Re: [PATCH]: convert (long)round(d) -> lround(d), etc
- References: <Pine.LNX.4.44.0404271926270.32339-100000@www.eyesopen.com>
> From: Roger Sayle <roger@eyesopen.com>
>
> If you don't have a strong objection, I think it would be safer to
> tweak your patch to "if (optimize && flag_unsafe_math_optimizations)".
> Ok for mainline with that change.
Sounds prudent.
Thoughts on this approach?
if (optimize
&& (flag_unsafe_math_optimizations
|| TYPE_PRECISION (type) >= TYPE_PRECISION (long_integer_type_node)))
That should also avoid the problematic case you raised but allow the
transformation when it's safe.
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu