aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ConstantFolding.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r--llvm/lib/Analysis/ConstantFolding.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index fbc6275..38cccb3 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -1973,9 +1973,8 @@ static Constant *constantFoldCanonicalize(const Type *Ty, const CallBase *CI,
DenormalMode DenormMode =
CI->getFunction()->getDenormalMode(Src.getSemantics());
- // TODO: Should allow folding for pure IEEE.
if (DenormMode == DenormalMode::getIEEE())
- return nullptr;
+ return ConstantFP::get(CI->getContext(), Src);
if (DenormMode.Input == DenormalMode::Dynamic)
return nullptr;