[llvm-commits] [llvm-gcc-4.2] r42142 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h
Dale Johannesen
dalej at apple.com
Wed Sep 19 10:44:07 PDT 2007
Author: johannes
Date: Wed Sep 19 12:44:07 2007
New Revision: 42142
URL: http://llvm.org/viewvc/llvm-project?rev=42142&view=rev
Log:
Handle fabsl.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
llvm-gcc-4.2/trunk/gcc/llvm-internal.h
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=42142&r1=42141&r2=42142&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Wed Sep 19 12:44:07 2007
@@ -2734,7 +2734,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");
}
}
@@ -3998,13 +3998,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.2/trunk/gcc/llvm-internal.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-internal.h?rev=42142&r1=42141&r2=42142&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-internal.h (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-internal.h Wed Sep 19 12:44:07 2007
@@ -502,7 +502,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