diff options
author | Evandro Menezes <e.menezes@samsung.com> | 2019-09-30 23:21:02 +0000 |
---|---|---|
committer | Evandro Menezes <e.menezes@samsung.com> | 2019-09-30 23:21:02 +0000 |
commit | 41ead4281fad5322c91d2b4678c03a2c691f6c40 (patch) | |
tree | 354dfd445a1ec573663bd75c156c6a4ca9049bc9 /llvm/lib | |
parent | 38456776b38e28f04bae6314bbf9f3498d8ee579 (diff) | |
download | bcm5719-llvm-41ead4281fad5322c91d2b4678c03a2c691f6c40.tar.gz bcm5719-llvm-41ead4281fad5322c91d2b4678c03a2c691f6c40.zip |
[SimplifyLibCalls] Define the value of the Euler number
This patch fixes the build break on Windows hosts.
There must be a better way of accessing the equivalent POSIX math constant
`M_E`.
llvm-svn: 373274
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp index b252167ba27..3af754a3eb0 100644 --- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp @@ -1941,7 +1941,9 @@ Value *LibCallSimplifier::optimizeLog(CallInst *Log, IRBuilder<> &B) { ArgID == Intrinsic::exp || ArgID == Intrinsic::exp2) { Constant *Eul; if (ArgLb == ExpLb || ArgID == Intrinsic::exp) - Eul = ConstantFP::get(Log->getType(), M_E); + // FIXME: The Euler number should be M_E, but it's place of definition + // is not quite standard. + Eul = ConstantFP::get(Log->getType(), 2.7182818284590452354); else if (ArgLb == Exp2Lb || ArgID == Intrinsic::exp2) Eul = ConstantFP::get(Log->getType(), 2.0); else |