From 66c6fe65347989d0d71a2f115c5a83193d0f1b77 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Mon, 13 Aug 2018 20:20:38 +0000 Subject: revert r339608 - [SimplifyLibCalls] don't drop fast-math-flags on trig reflection folds Can't set the builder flags without knowing this is an FPMathOperator. I'll add a test for that and try again. llvm-svn: 339609 --- llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp') diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp index 599d50b46cb..eda3f059e69 100644 --- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp @@ -1124,9 +1124,7 @@ Value *LibCallSimplifier::optimizeCAbs(CallInst *CI, IRBuilder<> &B) { static Value *optimizeTrigReflections(CallInst *Call, LibFunc Func, IRBuilder<> &B) { - IRBuilder<>::FastMathFlagGuard Guard(B); - B.setFastMathFlags(Call->getFastMathFlags()); - + // FIXME: This drops FMF. // TODO: Add tan() and other calls. // TODO: Can this be shared to also handle LLVM intrinsics? Value *X; -- cgit v1.2.3