[cfe-dev] Clang ignoring --fast-math for complex division, serious performance hit

Joerg Sonnenberger via cfe-dev cfe-dev at lists.llvm.org
Mon Nov 6 07:41:25 PST 2017


On Sun, Nov 05, 2017 at 09:43:56AM -0800, Richard Campbell via cfe-dev wrote:
> Similarly to a problem that occurred two years ago with multiplication
> (http://lists.llvm.org/pipermail/cfe-dev/2015-July/043792.html),
> production Clang (Apple LLVM version 9.0.0 (clang-900.0.38)) is now
> issuing __divsc3 function calls anywhere complex division occurs,
> irrespective of the -ffast-math setting.

Are multiplication and division really the same thing for -ffast-math?
There are a lot of cases were division will trivially result in horrible
loss of precision. I think the situation is far worse than for
multiplication.

Joerg


More information about the cfe-dev mailing list