craig.topper updated this revision to Diff 289273.
craig.topper added a comment.
Use an alias.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86820/new/
https://reviews.llvm.org/D86820
Files:
clang/include/clang/Driver/Options.td
clang/test/Driver/cl-x86-flags.c
Index: clang/test/Driver/cl-x86-flags.c
===================================================================
--- clang/test/Driver/cl-x86-flags.c
+++ clang/test/Driver/cl-x86-flags.c
@@ -128,5 +128,9 @@
// RUN: %clang_cl -m64 -arch:avx512 --target=i386-pc-windows -### -- 2>&1 %s |
FileCheck -check-prefix=avx51264 %s
// avx51264: argument unused during compilation
+// RUN: %clang_cl -m64 -arch:AVX -tune:haswell --target=x86_64-pc-windows -###
-- 2>&1 %s | FileCheck -check-prefix=tune %s
+// tune: "-target-cpu" "sandybridge"
+// tune-SAME: "-tune-cpu" "haswell"
+
void f() {
}
Index: clang/include/clang/Driver/Options.td
===================================================================
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -4685,6 +4685,9 @@
def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">,
HelpText<"Enable OpenMP support with experimental SIMD support">,
Alias<fopenmp>;
+def _SLASH_tune : CLCompileJoined<"tune:">,
+ HelpText<"Set CPU for optimization without affecting instruction set">,
+ Alias<mtune_EQ>;
// Non-aliases:
Index: clang/test/Driver/cl-x86-flags.c
===================================================================
--- clang/test/Driver/cl-x86-flags.c
+++ clang/test/Driver/cl-x86-flags.c
@@ -128,5 +128,9 @@
// RUN: %clang_cl -m64 -arch:avx512 --target=i386-pc-windows -### -- 2>&1 %s | FileCheck -check-prefix=avx51264 %s
// avx51264: argument unused during compilation
+// RUN: %clang_cl -m64 -arch:AVX -tune:haswell --target=x86_64-pc-windows -### -- 2>&1 %s | FileCheck -check-prefix=tune %s
+// tune: "-target-cpu" "sandybridge"
+// tune-SAME: "-tune-cpu" "haswell"
+
void f() {
}
Index: clang/include/clang/Driver/Options.td
===================================================================
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -4685,6 +4685,9 @@
def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">,
HelpText<"Enable OpenMP support with experimental SIMD support">,
Alias<fopenmp>;
+def _SLASH_tune : CLCompileJoined<"tune:">,
+ HelpText<"Set CPU for optimization without affecting instruction set">,
+ Alias<mtune_EQ>;
// Non-aliases:
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits