]> granicus.if.org Git - clang/commitdiff
[Hexagon] Remove fp-contract=fast setting for at O3
authorBrendon Cahoon <bcahoon@codeaurora.org>
Wed, 12 Sep 2018 20:35:56 +0000 (20:35 +0000)
committerBrendon Cahoon <bcahoon@codeaurora.org>
Wed, 12 Sep 2018 20:35:56 +0000 (20:35 +0000)
Change Hexagon so that the setting for fp-contract is the default setting.
This makes Hexagon consistent with all other targets.

Differential Revision: https://reviews.llvm.org/D49999

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342078 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/Hexagon.cpp
test/Driver/hexagon-toolchain-elf.c

index c2b27b6d9ac663349193ad2065324243b86d5978..778852ffc543cfd56d3a67a6c2813c488390ba73 100644 (file)
@@ -513,11 +513,6 @@ unsigned HexagonToolChain::getOptimizationLevel(
 void HexagonToolChain::addClangTargetOptions(const ArgList &DriverArgs,
                                              ArgStringList &CC1Args,
                                              Action::OffloadKind) const {
-  if (!DriverArgs.hasArg(options::OPT_ffp_contract)) {
-    unsigned OptLevel = getOptimizationLevel(DriverArgs);
-    if (OptLevel >= 3)
-      CC1Args.push_back("-ffp-contract=fast");
-  }
   if (DriverArgs.hasArg(options::OPT_ffixed_r19)) {
     CC1Args.push_back("-target-feature");
     CC1Args.push_back("+reserved-r19");
index 8f4c320ce45b5a08357d2c852e43fab7b28ca489..a15c0f3434ce7feed73f7df456612f10be35e868 100644 (file)
 // RUN:   -O3 \
 // RUN:   %s 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK026 %s
-// CHECK026: "-ffp-contract=fast"
+// CHECK026-NOT: "-ffp-contract=fast"
 // CHECK026: hexagon-link
 
 // RUN: %clang -### -target hexagon-unknown-elf \