[llvm-dev] defaults for FP contraction [e.g. fused multiply-add]: suggestion and patch to be slightly more aggressive and to make Clang`s optimization settings closer to having the same meaning as when they are given to GCC [at least for "-O3"]
Abe Skolnik via llvm-dev
llvm-dev at lists.llvm.org
Fri Sep 9 15:48:20 PDT 2016
[Stephen Canon wrote:]
>>> Gating this on -Owhatever is dangerous, . We should simply default to the pragma “on” state universally.
>> Why so? [honestly asking, not arguing]
>> My guess: b/c we don`t want programs to give different results when compiled at different "-O<...>" settings with the exception of "-Ofast".
[Steve Canon wrote:]
> Pretty much. In particular, imagine a user trying to debug an unexpected floating point result caused by conversion of a*b + c into fma(a, b, c).
I strongly agree with that philosophy. I tried arguing that GCC should change its policy, but
I was rebuffed ["RESOLVED INVALID"].
For reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77515
More information about the llvm-dev