aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2017-04-20 17:09:35 +0000
committerAdam Nemet <anemet@apple.com>2017-04-20 17:09:35 +0000
commit03af42444b3b0acb3a934b8406498d65ace8faf3 (patch)
tree0f2ebcdd4442c79d4b5805b5c0e58e7cd9f18686 /clang/lib/CodeGen/BackendUtil.cpp
parent2a593bc508920c1faf05f1f847b951cd2b5055b4 (diff)
downloadllvm-03af42444b3b0acb3a934b8406498d65ace8faf3.zip
llvm-03af42444b3b0acb3a934b8406498d65ace8faf3.tar.gz
llvm-03af42444b3b0acb3a934b8406498d65ace8faf3.tar.bz2
Don't pass FPOpFusion::Strict to the backend
This restores the behavior prior to D31167 where the code-gen default was FPC_On which mapped to FPOpFusion::Standard. After merging the FE state (on/off) and the code-gen state (on/fast/off), the default became off to match the front-end. In other words, the front-end controls when to fuse along the language standards and the backend shouldn't override this by splitting fused intrinsics as FPOpFusion::Strict would imply. Differential Revision: https://reviews.llvm.org/D32301 llvm-svn: 300858
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 3f95740..20059d9 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -369,7 +369,9 @@ static void initTargetOptions(llvm::TargetOptions &Options,
// Set FP fusion mode.
switch (LangOpts.getDefaultFPContractMode()) {
case LangOptions::FPC_Off:
- Options.AllowFPOpFusion = llvm::FPOpFusion::Strict;
+ // Preserve any contraction performed by the front-end. (Strict performs
+ // splitting of the muladd instrinsic in the backend.)
+ Options.AllowFPOpFusion = llvm::FPOpFusion::Standard;
break;
case LangOptions::FPC_On:
Options.AllowFPOpFusion = llvm::FPOpFusion::Standard;