This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, Fix PR 31098] a*C == b*C is not foldded to a == b with --fast-math/floating point
Hi Paolo,
flag_unsafe_math_optimizations == 0 should disable the optimization,
since ((float)11184813.0 * 3) == ((float)11184814.0 * 3), and
((float)16777215.0 + 2) == ((float)16777214.0 + 2). Same for
HONOR_INFINITIES, and for flag_trapping_math == 1.
It is not necessary to check HONOR_NANS and HONOR_SNANS, since neither
is set for flag_trapping_math == 0.
Thanks for the insight. Updated patch ( fold-const.c + testcase ) coming
up shortly.
Thanks,
Pranav
Pranav Bhandarkar
GNU Tools
Celunite, Inc.
(www.celunite.com)
+91-98220 82881