[llvm-commits] [llvm-gcc-4.0] r42141 - in /llvm-gcc-4.0/trunk/gcc: llvm-convert.cpp llvm-internal.h
Dale Johannesen
dalej at apple.com
Wed Sep 19 10:26:19 PDT 2007
Author: johannes
Date: Wed Sep 19 12:26:19 2007
New Revision: 42141
URL: http://llvm.org/viewvc/llvm-project?rev=42141&view=rev
Log:
Handle fabsl.
Modified:
llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp
llvm-gcc-4.0/trunk/gcc/llvm-internal.h
Modified: llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp?rev=42141&r1=42140&r2=42141&view=diff
==============================================================================
--- llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Wed Sep 19 12:26:19 2007
@@ -3207,7 +3207,7 @@
return Builder.CreateSelect(Cmp, Op, OpN, "abs");
} else {
// Turn FP abs into fabs/fabsf.
- return EmitBuiltinUnaryFPOp(Op, "fabsf", "fabs");
+ return EmitBuiltinUnaryFPOp(Op, "fabsf", "fabs", "fabsl");
}
}
@@ -4416,13 +4416,17 @@
}
Value *TreeToLLVM::EmitBuiltinUnaryFPOp(Value *Amt, const char *F32Name,
- const char *F64Name) {
+ const char *F64Name,
+ const char *LongDoubleName) {
const char *Name = 0;
switch (Amt->getType()->getTypeID()) {
default: assert(0 && "Unknown FP type!");
case Type::FloatTyID: Name = F32Name; break;
case Type::DoubleTyID: Name = F64Name; break;
+ case Type::X86_FP80TyID:
+ case Type::PPC_FP128TyID:
+ case Type::FP128TyID: Name = LongDoubleName; break;
}
return Builder.CreateCall(cast<Function>(
Modified: llvm-gcc-4.0/trunk/gcc/llvm-internal.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-internal.h?rev=42141&r1=42140&r2=42141&view=diff
==============================================================================
--- llvm-gcc-4.0/trunk/gcc/llvm-internal.h (original)
+++ llvm-gcc-4.0/trunk/gcc/llvm-internal.h Wed Sep 19 12:26:19 2007
@@ -558,7 +558,7 @@
Value *EmitBuiltinUnaryFPOp(Value *Amt, Intrinsic::ID F32ID,
Intrinsic::ID F64ID);
Value *EmitBuiltinUnaryFPOp(Value *InVal, const char *F32Name,
- const char *F64Name);
+ const char *F64Name, const char *LongDoubleName);
Value *EmitBuiltinPOWI(tree_node *exp);
bool EmitBuiltinConstantP(tree_node *exp, Value *&Result);
More information about the llvm-commits
mailing list