summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorMelanie Blower <melanie.blower@intel.com>2020-05-15 07:30:49 -0700
committerMelanie Blower <melanie.blower@intel.com>2020-05-20 06:19:10 -0700
commit827be690dce158924924a70fda79b35a9d7ad1cc (patch)
tree8517e15b2a1027dd6140be6b20a839ff0ae98c53 /clang/lib/CodeGen/CGExprScalar.cpp
parenteab4a199d16851fd8ad8308364d7b1b87bdbb430 (diff)
[clang] FastMathFlags.allowContract should be initialized only from FPFeatures.allowFPContractAcrossStatement
Summary: Fix bug introduced in D72841 adding support for pragma float_control Reviewers: rjmccall, Anastasia Differential Revision: https://reviews.llvm.org/D79903
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index 76f58b284eeb..346c429f663e 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -223,8 +223,7 @@ static void updateFastMathFlags(llvm::FastMathFlags &FMF,
FMF.setNoSignedZeros(FPFeatures.noSignedZeros());
FMF.setAllowReciprocal(FPFeatures.allowReciprocalMath());
FMF.setApproxFunc(FPFeatures.allowApproximateFunctions());
- FMF.setAllowContract(FPFeatures.allowFPContractAcrossStatement() ||
- FPFeatures.allowFPContractWithinStatement());
+ FMF.setAllowContract(FPFeatures.allowFPContractAcrossStatement());
}
/// Propagate fast-math flags from \p Op to the instruction in \p V.