r342078 - [Hexagon] Remove fp-contract=fast setting for at O3

Brendon Cahoon via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 12 13:35:57 PDT 2018


Author: bcahoon
Date: Wed Sep 12 13:35:56 2018
New Revision: 342078

URL: http://llvm.org/viewvc/llvm-project?rev=342078&view=rev
Log:
[Hexagon] Remove fp-contract=fast setting for at O3

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


Modified:
    cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp
    cfe/trunk/test/Driver/hexagon-toolchain-elf.c

Modified: cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp?rev=342078&r1=342077&r2=342078&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp Wed Sep 12 13:35:56 2018
@@ -513,11 +513,6 @@ unsigned HexagonToolChain::getOptimizati
 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");

Modified: cfe/trunk/test/Driver/hexagon-toolchain-elf.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/hexagon-toolchain-elf.c?rev=342078&r1=342077&r2=342078&view=diff
==============================================================================
--- cfe/trunk/test/Driver/hexagon-toolchain-elf.c (original)
+++ cfe/trunk/test/Driver/hexagon-toolchain-elf.c Wed Sep 12 13:35:56 2018
@@ -110,7 +110,7 @@
 // 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 \




More information about the cfe-commits mailing list