[PATCH]: convert (long)round(d) -> lround(d), etc

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Wed Apr 28 13:20:00 GMT 2004


 > 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



More information about the Gcc-patches mailing list