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]: convert (long)round(d) -> lround(d), etc


 > 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


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