summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2018-10-24 17:55:18 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2018-10-24 17:55:18 +0000
commitf124275cf9ddc8b8da68349f5f166640b31473be (patch)
tree184f231f33151b8073b1fedf79c9a251132a29a5 /clang
parent57b5ac14314b18d3259999f9283a962b3b065c56 (diff)
downloadbcm5719-llvm-f124275cf9ddc8b8da68349f5f166640b31473be.tar.gz
bcm5719-llvm-f124275cf9ddc8b8da68349f5f166640b31473be.zip
[Hexagon] Flip hexagon-autohvx to be true by default
This will allow other generators of LLVM IR to use the auto-vectorizer without having to change that flag. Note: on its own, this patch will disable auto-vectorization on Hexagon in all cases, regardless of the -fvectorize flag. There is a companion LLVM patch that together with this one forms an NFC for clang users. llvm-svn: 345170
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Driver/ToolChains/Hexagon.cpp4
-rw-r--r--clang/test/Driver/hexagon-vectorize.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Driver/ToolChains/Hexagon.cpp b/clang/lib/Driver/ToolChains/Hexagon.cpp
index 8778a1a30fd..4da63a6d06e 100644
--- a/clang/lib/Driver/ToolChains/Hexagon.cpp
+++ b/clang/lib/Driver/ToolChains/Hexagon.cpp
@@ -516,9 +516,9 @@ void HexagonToolChain::addClangTargetOptions(const ArgList &DriverArgs,
CC1Args.push_back("-target-feature");
CC1Args.push_back("+reserved-r19");
}
- if (isAutoHVXEnabled(DriverArgs)) {
+ if (!isAutoHVXEnabled(DriverArgs)) {
CC1Args.push_back("-mllvm");
- CC1Args.push_back("-hexagon-autohvx");
+ CC1Args.push_back("-hexagon-autohvx=0");
}
}
diff --git a/clang/test/Driver/hexagon-vectorize.c b/clang/test/Driver/hexagon-vectorize.c
index dcd6a09222e..145011ccea7 100644
--- a/clang/test/Driver/hexagon-vectorize.c
+++ b/clang/test/Driver/hexagon-vectorize.c
@@ -3,7 +3,7 @@
// RUN: %clang -target hexagon -fvectorize -fno-vectorize -### %s 2>&1 | FileCheck %s --check-prefix=CHECK-NOVECTOR
// RUN: %clang -target hexagon -fvectorize -### %s 2>&1 | FileCheck %s --check-prefix=CHECK-NEEDHVX
-// CHECK-DEFAULT-NOT: hexagon-autohvx
-// CHECK-VECTOR: "-mllvm" "-hexagon-autohvx"
-// CHECK-NOVECTOR-NOT: hexagon-autohvx
+// CHECK-DEFAULT: -hexagon-autohvx={{false|0}}
+// CHECK-VECTOR-NOT: -hexagon-autohvx={{false|0}}
+// CHECK-NOVECTOR: -hexagon-autohvx={{false|0}}
// CHECK-NEEDHVX: warning: auto-vectorization requires HVX, use -mhvx to enable it
OpenPOWER on IntegriCloud