[PATCH] These builtin functions set errno. Mark them accordingly.

hfinkel at anl.gov hfinkel at anl.gov
Fri May 16 11:41:58 PDT 2014


================
Comment at: include/clang/Basic/Builtins.def:279
@@ -280,1 +278,3 @@
+BUILTIN(__builtin_sqrtf, "ff"  , "Fne")
+BUILTIN(__builtin_sqrtl, "LdLd", "Fne")
 BUILTIN(__builtin_tan , "dd"  , "Fnc")
----------------
Also, is this right? sqrt should become an ISD node, which at least on some platforms, gets directly lowered.

Generally, I'm a bit concerned here that we really need target feedback to make this decision properly. These are fine defaults, but we don't want to prevent the intended direct lowering (which is the whole point of the builtins anyway).

But, hey, Clang can use TTI too :-) [Unfortunately, I'm not kidding really].

http://reviews.llvm.org/D3806






More information about the cfe-commits mailing list