From 58ae5b4b1e2fc02b95d6650af5755a59639aa153 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 6 May 2010 06:13:53 +0000 Subject: [PATCH] add todos for isinf_sign and isnormal, which I don't intend to implement 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 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index 90fcb69828..4bd1b5d6ec 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -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)); -- 2.40.0