[PATCH] D49999: [Hexagon] Remove fp-contract=fast setting for at O3

Brendon Cahoon via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 30 11:48:46 PDT 2018


bcahoon created this revision.
bcahoon added a reviewer: kparzysz.
Herald added a subscriber: cfe-commits.

Change Hexagon so that the setting for fp-contract is the default setting. This makes Hexagon consistent with all the other targets.


Repository:
  rC Clang

https://reviews.llvm.org/D49999

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


Index: clang/test/Driver/hexagon-toolchain-elf.c
===================================================================
--- clang/test/Driver/hexagon-toolchain-elf.c
+++ clang/test/Driver/hexagon-toolchain-elf.c
@@ -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 \
Index: clang/lib/Driver/ToolChains/Hexagon.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Hexagon.cpp
+++ clang/lib/Driver/ToolChains/Hexagon.cpp
@@ -513,11 +513,6 @@
 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");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49999.158029.patch
Type: text/x-patch
Size: 1241 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180730/447c37fd/attachment.bin>


More information about the cfe-commits mailing list