summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2018-09-19 12:01:38 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2018-09-19 12:01:38 +0000
commite5e1ea79fd2ceff7f5931300165286be018a64c1 (patch)
treefa10b9ac0dea3954626e911f6d05bffba1d9423e /llvm/lib/Transforms/Utils/BuildLibCalls.cpp
parent86a5e436564b6af8fc209654114fa19dccfae71b (diff)
downloadbcm5719-llvm-e5e1ea79fd2ceff7f5931300165286be018a64c1.tar.gz
bcm5719-llvm-e5e1ea79fd2ceff7f5931300165286be018a64c1.zip
[InstCombine] Don't transform sin/cos -> tanl if for half types
This is still unsafe for long double, we will transform things into tanl even if tanl is for another type. But that's for someone else to fix. llvm-svn: 342542
Diffstat (limited to 'llvm/lib/Transforms/Utils/BuildLibCalls.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/BuildLibCalls.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
index b782641383a..6eb39e5b959 100644
--- a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
@@ -746,6 +746,8 @@ bool llvm::hasUnaryFloatFn(const TargetLibraryInfo *TLI, Type *Ty,
LibFunc DoubleFn, LibFunc FloatFn,
LibFunc LongDoubleFn) {
switch (Ty->getTypeID()) {
+ case Type::HalfTyID:
+ return false;
case Type::FloatTyID:
return TLI->has(FloatFn);
case Type::DoubleTyID:
OpenPOWER on IntegriCloud