[cfe-dev] Trivial math builtins not inlined

Domagoj Saric domagoj.saric at littleendian.com
Wed Dec 7 03:58:01 PST 2011


While compiling for -march=armv7-a, Apple Clang from Xcode 4.2 fails to inline 
math builtins, relatively complex ones like __builtin_fmodf as well as trivial 
(single instruction) ones like __builtin_lrintf.
-ffast-math -D__NO_MATH_INLINES do not help...

__builtin_lrintf is most important to me as I need fast scalar float to int 
rounding and there is no intrisic for that AFAIK.


ps according to http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html one needs 
to compile with -std=c99 in order to have std math.h functions recognized as 
builtins, but what if I (need to) specify -std=gnu++0x?


-- 
"What Huxley teaches is that in the age of advanced technology, spiritual
devastation is more likely to come from an enemy with a smiling face than
from one whose countenance exudes suspicion and hate."
Neil Postman



More information about the cfe-dev mailing list