Revert r345170 [along with its llvm counterpart r345169] as it makes Halide builds...
authorAlina Sbirlea <asbirlea@google.com>
Sat, 27 Oct 2018 04:51:09 +0000 (04:51 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Sat, 27 Oct 2018 04:51:09 +0000 (04:51 +0000)
llvm-svn: 345446

clang/lib/Driver/ToolChains/Hexagon.cpp
clang/test/Driver/hexagon-vectorize.c

index 4da63a6..8778a1a 100644 (file)
@@ -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=0");
+    CC1Args.push_back("-hexagon-autohvx");
   }
 }
 
index 145011c..dcd6a09 100644 (file)
@@ -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: -hexagon-autohvx={{false|0}}
-// CHECK-VECTOR-NOT: -hexagon-autohvx={{false|0}}
-// CHECK-NOVECTOR: -hexagon-autohvx={{false|0}}
+// CHECK-DEFAULT-NOT: hexagon-autohvx
+// CHECK-VECTOR: "-mllvm" "-hexagon-autohvx"
+// CHECK-NOVECTOR-NOT: hexagon-autohvx
 // CHECK-NEEDHVX: warning: auto-vectorization requires HVX, use -mhvx to enable it