[PATCH] D39812: [Driver, CodeGen] pass through and apply -fassociative-math

Sanjay Patel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 8 13:00:51 PST 2017

spatel added a comment.

In https://reviews.llvm.org/D39812#919699, @wristow wrote:

> Yes, I think we want to match that behavior.  But by "light up" 'nsz' and the no-trapping-math attribute, do you mean automatically turn them on when '-fassociative-math' is specified?  I'd think it should be the other way around: Suppress the effect of '-fassociative-math' unless both '-fno-signed-zeros' and '-fno-trapping-math' are also specified.

Yes, my reading of the gcc docs was off. The code appears to match your understanding:

So we'll restrict the effect of -fassociative-math based on the presence of the other flags...more spaghetti needed. :)


More information about the cfe-commits mailing list