[clang] 789549b - [clang-cl] Map /QIntel-jcc-erratum to -mbranches-within-32B-boundaries
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 28 02:14:57 PDT 2021
Author: Hans Wennborg
Date: 2021-04-28T11:10:08+02:00
New Revision: 789549bea441f1347458505307db322aea3ac289
URL: https://github.com/llvm/llvm-project/commit/789549bea441f1347458505307db322aea3ac289
DIFF: https://github.com/llvm/llvm-project/commit/789549bea441f1347458505307db322aea3ac289.diff
LOG: [clang-cl] Map /QIntel-jcc-erratum to -mbranches-within-32B-boundaries
Added:
Modified:
clang/include/clang/Driver/Options.td
clang/test/Driver/cl-options.c
Removed:
################################################################################
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index e70b793079ac..06a21a9b6e9c 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -5935,6 +5935,9 @@ def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">,
def _SLASH_tune : CLCompileJoined<"tune:">,
HelpText<"Set CPU for optimization without affecting instruction set">,
Alias<mtune_EQ>;
+def _SLASH_QIntel_jcc_erratum : CLFlag<"QIntel-jcc-erratum">,
+ HelpText<"Align branches within 32-byte boundaries to mitigate the performance impact of the Intel JCC erratum.">,
+ Alias<mbranches_within_32B_boundaries>;
// Non-aliases:
@@ -6131,7 +6134,6 @@ def _SLASH_LN : CLFlag<"LN">;
def _SLASH_MP : CLJoined<"MP">;
def _SLASH_Qfast_transcendentals : CLFlag<"Qfast_transcendentals">;
def _SLASH_QIfist : CLFlag<"QIfist">;
-def _SLASH_QIntel_jcc_erratum : CLFlag<"QIntel-jcc-erratum">;
def _SLASH_Qimprecise_fwaits : CLFlag<"Qimprecise_fwaits">;
def _SLASH_Qpar : CLFlag<"Qpar">;
def _SLASH_Qpar_report : CLJoined<"Qpar-report">;
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
index 77427f9daa95..be90b3fc6cc2 100644
--- a/clang/test/Driver/cl-options.c
+++ b/clang/test/Driver/cl-options.c
@@ -299,6 +299,10 @@
// RUN: %clang_cl /d1PP -### -- %s 2>&1 | FileCheck -check-prefix=d1PP %s
// d1PP: -dD
+// RUN: %clang_cl /c /QIntel-jcc-erratum -### -- %s 2>&1 | FileCheck -check-prefix=jcceratum %s
+// jcceratum: "-mllvm" "-x86-branches-within-32B-boundaries"
+
+
// We forward any unrecognized -W diagnostic options to cc1.
// RUN: %clang_cl -Wunused-pragmas -### -- %s 2>&1 | FileCheck -check-prefix=WJoined %s
// WJoined: "-cc1"
More information about the cfe-commits
mailing list