diff options
| author | Karthik Bhat <kv.bhat@samsung.com> | 2014-03-24 04:36:06 +0000 |
|---|---|---|
| committer | Karthik Bhat <kv.bhat@samsung.com> | 2014-03-24 04:36:06 +0000 |
| commit | 195e9dd91b4d47480fe893662e1f6abd86539b8f (patch) | |
| tree | 096777870f15e6bb6d58cc84a5e15a8d9c739dba /llvm/lib | |
| parent | 717aeb6d7bb4d0e202009e92af9169595f22e2a7 (diff) | |
| download | bcm5719-llvm-195e9dd91b4d47480fe893662e1f6abd86539b8f.tar.gz bcm5719-llvm-195e9dd91b4d47480fe893662e1f6abd86539b8f.zip | |
Allow constant folding of ceil function whenever feasible
llvm-svn: 204583
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index 8ff79d6f625..782acfa0516 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/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) |

