This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Perform constant folding of math builtins
>>>>> "Kaveh" == Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:
>> From: Roger Sayle
>> The second is that these values need to be calculated in the
>> precision required for the target, so shouldn't use the host
>> functions anyway.
Kaveh> Why not? Aren't we talking about "unsafe" math opts?
The description of that option isn't clear. But I would read it to
allow things like optimizations that make the rounding be different,
or the LSB of the result. I wouldn't expect it to mean "you can do
the operation in a precision different from what I asked". In other
words, I wouldn't expect the compiler to replace, say, a sqrt of a
double argument by a sqrt of a float argument.
Doing constant folding with the host float library could be just as
drastic.
paul