[cfe-dev] clang does not use sincos with -O2 but gcc does

René J.V. Bertin via cfe-dev cfe-dev at lists.llvm.org
Thu May 18 07:20:16 PDT 2017


On Thursday May 18 2017 14:55:03 Dennis Luehring wrote:

>clang DOES use sincos if -ffast-math option is given
>gcc use it even without -ffast-math

To make matters even more complex: on Mac the situation is the opposite, that is clang always uses a sincos library function provided by Apple.

>i don't think its the x87 opcode - because then LLVM would inline it - and not using a call

That depends, LLVM cannot know how the sincos() function from libm is implemented. 

R.



More information about the cfe-dev mailing list