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]: Fix PR middle-end/30789, complex math folding via MPC


From: "Joseph S. Myers" <joseph@codesourcery.com>

On Fri, 14 Aug 2009, Kaveh R. GHAZI wrote:

The Annex G special cases only occur in cases where NaN is returned. Since
GCC's MPC infrastructure already backs out when encountering NaN values,
using MPC here means folding doesn't occur and the correct Annex G values
are calculated by libgcc at runtime.

These cases still need to work in static initializers, so you may need to avoid the MPC infrastructure backing out when evaluating static initializers, and add tests of them to your testcase.

Note "backing out" from MPC would fall onto the existing GCC folding code which gets all the Annex G stuff wrong. That would resume folding static initializers but yield a bad result. So what I'll do is allow MPC to fold Inf and Nan I/O based on a switch.


Unfortunately after working on this a bit I see that MPC gets some of these special cases wrong. I'll seek to get them fixed in MPC then update GCC to take advantage of it.

--Kaveh


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