]> granicus.if.org Git - clang/commitdiff
add todos for isinf_sign and isnormal, which I don't intend to implement
authorChris Lattner <sabre@nondot.org>
Thu, 6 May 2010 06:13:53 +0000 (06:13 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 6 May 2010 06:13:53 +0000 (06:13 +0000)
in the near future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103169 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBuiltin.cpp

index 90fcb698285e960dc4a1e94443defbf6193fc243..4bd1b5d6ecbcc75b126a5acba66d6452e8ea401c 100644 (file)
@@ -361,7 +361,14 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
     V = Builder.CreateFCmpOEQ(V, ConstantFP::getInfinity(V->getType()),"isinf");
     return RValue::get(Builder.CreateZExt(V, ConvertType(E->getType()), "tmp"));
   }
-   
+      
+  // TODO: BI__builtin_isinf_sign
+  //   isinf_sign(x) -> isinf(x) ? (signbit(x) ? -1 : 1) : 0
+  // TODO: BI__builtin_isnormal
+  //   isnormal(x) -> x != x && fabs(x) < infinity && fabsf(x) >= float_min
+  //   where floatmin is the minimum value for the fp type.  Not sure if this is
+  //   APFloat::getSmallest or getSmallestNormalized.
+      
   case Builtin::BI__builtin_isfinite: {
     // isfinite(x) --> x == x && fabs(x) != infinity; }
     Value *V = EmitScalarExpr(E->getArg(0));