summaryrefslogtreecommitdiff
path: root/lib/Analysis/ConstantFolding.cpp
diff options
context:
space:
mode:
authorKarthik Bhat <kv.bhat@samsung.com>2014-03-24 04:36:06 +0000
committerKarthik Bhat <kv.bhat@samsung.com>2014-03-24 04:36:06 +0000
commit07707e8969a3936f216874f314c5f8ceaa594a90 (patch)
tree0e17963b0f0428dae19aa864408eeb847268524b /lib/Analysis/ConstantFolding.cpp
parent0259b8e14f73232d7bdc11641608ac996779c2b3 (diff)
downloadllvm-07707e8969a3936f216874f314c5f8ceaa594a90.tar.gz
llvm-07707e8969a3936f216874f314c5f8ceaa594a90.tar.bz2
llvm-07707e8969a3936f216874f314c5f8ceaa594a90.tar.xz
Allow constant folding of ceil function whenever feasible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204583 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ConstantFolding.cpp')
-rw-r--r--lib/Analysis/ConstantFolding.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp
index 8ff79d6f62..782acfa051 100644
--- a/lib/Analysis/ConstantFolding.cpp
+++ b/lib/Analysis/ConstantFolding.cpp
@@ -1186,6 +1186,7 @@ bool llvm::canConstantFoldCallTo(const Function *F) {
case Intrinsic::exp:
case Intrinsic::exp2:
case Intrinsic::floor:
+ case Intrinsic::ceil:
case Intrinsic::sqrt:
case Intrinsic::pow:
case Intrinsic::powi:
@@ -1390,6 +1391,8 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID,
#endif
case Intrinsic::floor:
return ConstantFoldFP(floor, V, Ty);
+ case Intrinsic::ceil:
+ return ConstantFoldFP(ceil, V, Ty);
}
if (!TLI)