Skip to content

Commit 4def1ce

Browse files
authored
Reland "[X86] Remove knl/knm specific ISAs supports (#92883)" (#93136)
This reverts commit aa4069e.
1 parent 5287bb9 commit 4def1ce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+132
-1644
lines changed

clang/docs/ReleaseNotes.rst

+2
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,8 @@ AMDGPU Support
822822
X86 Support
823823
^^^^^^^^^^^
824824

825+
- Remove knl/knm specific ISA supports: AVX512PF, AVX512ER, PREFETCHWT1
826+
825827
Arm and AArch64 Support
826828
^^^^^^^^^^^^^^^^^^^^^^^
827829

clang/include/clang/Basic/BuiltinsX86.def

-21
Original file line numberDiff line numberDiff line change
@@ -832,23 +832,11 @@ TARGET_BUILTIN(__builtin_ia32_rsqrt14ss_mask, "V4fV4fV4fV4fUc", "ncV:128:", "avx
832832
TARGET_BUILTIN(__builtin_ia32_rsqrt14pd512_mask, "V8dV8dV8dUc", "ncV:512:", "avx512f,evex512")
833833
TARGET_BUILTIN(__builtin_ia32_rsqrt14ps512_mask, "V16fV16fV16fUs", "ncV:512:", "avx512f,evex512")
834834

835-
TARGET_BUILTIN(__builtin_ia32_rsqrt28sd_round_mask, "V2dV2dV2dV2dUcIi", "ncV:128:", "avx512er")
836-
TARGET_BUILTIN(__builtin_ia32_rsqrt28ss_round_mask, "V4fV4fV4fV4fUcIi", "ncV:128:", "avx512er")
837-
TARGET_BUILTIN(__builtin_ia32_rsqrt28pd_mask, "V8dV8dV8dUcIi", "ncV:512:", "avx512er,evex512")
838-
TARGET_BUILTIN(__builtin_ia32_rsqrt28ps_mask, "V16fV16fV16fUsIi", "ncV:512:", "avx512er,evex512")
839-
840835
TARGET_BUILTIN(__builtin_ia32_rcp14sd_mask, "V2dV2dV2dV2dUc", "ncV:128:", "avx512f")
841836
TARGET_BUILTIN(__builtin_ia32_rcp14ss_mask, "V4fV4fV4fV4fUc", "ncV:128:", "avx512f")
842837
TARGET_BUILTIN(__builtin_ia32_rcp14pd512_mask, "V8dV8dV8dUc", "ncV:512:", "avx512f,evex512")
843838
TARGET_BUILTIN(__builtin_ia32_rcp14ps512_mask, "V16fV16fV16fUs", "ncV:512:", "avx512f,evex512")
844839

845-
TARGET_BUILTIN(__builtin_ia32_rcp28sd_round_mask, "V2dV2dV2dV2dUcIi", "ncV:128:", "avx512er")
846-
TARGET_BUILTIN(__builtin_ia32_rcp28ss_round_mask, "V4fV4fV4fV4fUcIi", "ncV:128:", "avx512er")
847-
TARGET_BUILTIN(__builtin_ia32_rcp28pd_mask, "V8dV8dV8dUcIi", "ncV:512:", "avx512er,evex512")
848-
TARGET_BUILTIN(__builtin_ia32_rcp28ps_mask, "V16fV16fV16fUsIi", "ncV:512:", "avx512er,evex512")
849-
TARGET_BUILTIN(__builtin_ia32_exp2pd_mask, "V8dV8dV8dUcIi", "ncV:512:", "avx512er,evex512")
850-
TARGET_BUILTIN(__builtin_ia32_exp2ps_mask, "V16fV16fV16fUsIi", "ncV:512:", "avx512er,evex512")
851-
852840
TARGET_BUILTIN(__builtin_ia32_cvttps2dq512_mask, "V16iV16fV16iUsIi", "ncV:512:", "avx512f,evex512")
853841
TARGET_BUILTIN(__builtin_ia32_cvttps2udq512_mask, "V16iV16fV16iUsIi", "ncV:512:", "avx512f,evex512")
854842
TARGET_BUILTIN(__builtin_ia32_cvttpd2dq512_mask, "V8iV8dV8iUcIi", "ncV:512:", "avx512f,evex512")
@@ -960,15 +948,6 @@ TARGET_BUILTIN(__builtin_ia32_scattersiv16si, "vv*UsV16iV16iIi", "nV:512:", "avx
960948
TARGET_BUILTIN(__builtin_ia32_scatterdiv8di, "vv*UcV8OiV8OiIi", "nV:512:", "avx512f,evex512")
961949
TARGET_BUILTIN(__builtin_ia32_scatterdiv16si, "vv*UcV8OiV8iIi", "nV:512:", "avx512f,evex512")
962950

963-
TARGET_BUILTIN(__builtin_ia32_gatherpfdpd, "vUcV8ivC*IiIi", "nV:512:", "avx512pf,evex512")
964-
TARGET_BUILTIN(__builtin_ia32_gatherpfdps, "vUsV16ivC*IiIi", "nV:512:", "avx512pf,evex512")
965-
TARGET_BUILTIN(__builtin_ia32_gatherpfqpd, "vUcV8OivC*IiIi", "nV:512:", "avx512pf,evex512")
966-
TARGET_BUILTIN(__builtin_ia32_gatherpfqps, "vUcV8OivC*IiIi", "nV:512:", "avx512pf,evex512")
967-
TARGET_BUILTIN(__builtin_ia32_scatterpfdpd, "vUcV8iv*IiIi", "nV:512:", "avx512pf,evex512")
968-
TARGET_BUILTIN(__builtin_ia32_scatterpfdps, "vUsV16iv*IiIi", "nV:512:", "avx512pf,evex512")
969-
TARGET_BUILTIN(__builtin_ia32_scatterpfqpd, "vUcV8Oiv*IiIi", "nV:512:", "avx512pf,evex512")
970-
TARGET_BUILTIN(__builtin_ia32_scatterpfqps, "vUcV8Oiv*IiIi", "nV:512:", "avx512pf,evex512")
971-
972951
TARGET_BUILTIN(__builtin_ia32_knotqi, "UcUc", "nc", "avx512dq")
973952
TARGET_BUILTIN(__builtin_ia32_knothi, "UsUs", "nc", "avx512f")
974953
TARGET_BUILTIN(__builtin_ia32_knotsi, "UiUi", "nc", "avx512bw")

clang/include/clang/Basic/DiagnosticCommonKinds.td

-3
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,6 @@ def warn_invalid_feature_combination : Warning<
361361
def warn_target_unrecognized_env : Warning<
362362
"mismatch between architecture and environment in target triple '%0'; did you mean '%1'?">,
363363
InGroup<InvalidCommandLineArgument>;
364-
def warn_knl_knm_isa_support_removed : Warning<
365-
"KNL, KNM related Intel Xeon Phi CPU's specific ISA's supports will be removed in LLVM 19">,
366-
InGroup<DiagGroup<"knl-knm-isa-support-removed">>;
367364
def err_target_unsupported_abi_with_fpu : Error<
368365
"'%0' ABI is not supported with FPU">;
369366

clang/include/clang/Driver/Options.td

-6
Original file line numberDiff line numberDiff line change
@@ -6111,14 +6111,10 @@ def mavx512cd : Flag<["-"], "mavx512cd">, Group<m_x86_Features_Group>;
61116111
def mno_avx512cd : Flag<["-"], "mno-avx512cd">, Group<m_x86_Features_Group>;
61126112
def mavx512dq : Flag<["-"], "mavx512dq">, Group<m_x86_Features_Group>;
61136113
def mno_avx512dq : Flag<["-"], "mno-avx512dq">, Group<m_x86_Features_Group>;
6114-
def mavx512er : Flag<["-"], "mavx512er">, Group<m_x86_Features_Group>;
6115-
def mno_avx512er : Flag<["-"], "mno-avx512er">, Group<m_x86_Features_Group>;
61166114
def mavx512fp16 : Flag<["-"], "mavx512fp16">, Group<m_x86_Features_Group>;
61176115
def mno_avx512fp16 : Flag<["-"], "mno-avx512fp16">, Group<m_x86_Features_Group>;
61186116
def mavx512ifma : Flag<["-"], "mavx512ifma">, Group<m_x86_Features_Group>;
61196117
def mno_avx512ifma : Flag<["-"], "mno-avx512ifma">, Group<m_x86_Features_Group>;
6120-
def mavx512pf : Flag<["-"], "mavx512pf">, Group<m_x86_Features_Group>;
6121-
def mno_avx512pf : Flag<["-"], "mno-avx512pf">, Group<m_x86_Features_Group>;
61226118
def mavx512vbmi : Flag<["-"], "mavx512vbmi">, Group<m_x86_Features_Group>;
61236119
def mno_avx512vbmi : Flag<["-"], "mno-avx512vbmi">, Group<m_x86_Features_Group>;
61246120
def mavx512vbmi2 : Flag<["-"], "mavx512vbmi2">, Group<m_x86_Features_Group>;
@@ -6209,8 +6205,6 @@ def mpopcnt : Flag<["-"], "mpopcnt">, Group<m_x86_Features_Group>;
62096205
def mno_popcnt : Flag<["-"], "mno-popcnt">, Group<m_x86_Features_Group>;
62106206
def mprefetchi : Flag<["-"], "mprefetchi">, Group<m_x86_Features_Group>;
62116207
def mno_prefetchi : Flag<["-"], "mno-prefetchi">, Group<m_x86_Features_Group>;
6212-
def mprefetchwt1 : Flag<["-"], "mprefetchwt1">, Group<m_x86_Features_Group>;
6213-
def mno_prefetchwt1 : Flag<["-"], "mno-prefetchwt1">, Group<m_x86_Features_Group>;
62146208
def mprfchw : Flag<["-"], "mprfchw">, Group<m_x86_Features_Group>;
62156209
def mno_prfchw : Flag<["-"], "mno-prfchw">, Group<m_x86_Features_Group>;
62166210
def mptwrite : Flag<["-"], "mptwrite">, Group<m_x86_Features_Group>;

clang/lib/Basic/Targets/X86.cpp

-21
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,9 @@ bool X86TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
310310
HasAVX512VNNI = true;
311311
} else if (Feature == "+avx512bf16") {
312312
HasAVX512BF16 = true;
313-
} else if (Feature == "+avx512er") {
314-
HasAVX512ER = true;
315-
Diags.Report(diag::warn_knl_knm_isa_support_removed);
316313
} else if (Feature == "+avx512fp16") {
317314
HasAVX512FP16 = true;
318315
HasLegalHalfType = true;
319-
} else if (Feature == "+avx512pf") {
320-
HasAVX512PF = true;
321-
Diags.Report(diag::warn_knl_knm_isa_support_removed);
322316
} else if (Feature == "+avx512dq") {
323317
HasAVX512DQ = true;
324318
} else if (Feature == "+avx512bitalg") {
@@ -375,9 +369,6 @@ bool X86TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
375369
HasWBNOINVD = true;
376370
} else if (Feature == "+prefetchi") {
377371
HasPREFETCHI = true;
378-
} else if (Feature == "+prefetchwt1") {
379-
HasPREFETCHWT1 = true;
380-
Diags.Report(diag::warn_knl_knm_isa_support_removed);
381372
} else if (Feature == "+clzero") {
382373
HasCLZERO = true;
383374
} else if (Feature == "+cldemote") {
@@ -840,12 +831,8 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts,
840831
Builder.defineMacro("__AVX512VNNI__");
841832
if (HasAVX512BF16)
842833
Builder.defineMacro("__AVX512BF16__");
843-
if (HasAVX512ER)
844-
Builder.defineMacro("__AVX512ER__");
845834
if (HasAVX512FP16)
846835
Builder.defineMacro("__AVX512FP16__");
847-
if (HasAVX512PF)
848-
Builder.defineMacro("__AVX512PF__");
849836
if (HasAVX512DQ)
850837
Builder.defineMacro("__AVX512DQ__");
851838
if (HasAVX512BITALG)
@@ -897,8 +884,6 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts,
897884
Builder.defineMacro("__SM4__");
898885
if (HasPREFETCHI)
899886
Builder.defineMacro("__PREFETCHI__");
900-
if (HasPREFETCHWT1)
901-
Builder.defineMacro("__PREFETCHWT1__");
902887
if (HasCLZERO)
903888
Builder.defineMacro("__CLZERO__");
904889
if (HasKL)
@@ -1084,9 +1069,7 @@ bool X86TargetInfo::isValidFeatureName(StringRef Name) const {
10841069
.Case("avx512vpopcntdq", true)
10851070
.Case("avx512vnni", true)
10861071
.Case("avx512bf16", true)
1087-
.Case("avx512er", true)
10881072
.Case("avx512fp16", true)
1089-
.Case("avx512pf", true)
10901073
.Case("avx512dq", true)
10911074
.Case("avx512bitalg", true)
10921075
.Case("avx512bw", true)
@@ -1134,7 +1117,6 @@ bool X86TargetInfo::isValidFeatureName(StringRef Name) const {
11341117
.Case("pku", true)
11351118
.Case("popcnt", true)
11361119
.Case("prefetchi", true)
1137-
.Case("prefetchwt1", true)
11381120
.Case("prfchw", true)
11391121
.Case("ptwrite", true)
11401122
.Case("raoint", true)
@@ -1201,9 +1183,7 @@ bool X86TargetInfo::hasFeature(StringRef Feature) const {
12011183
.Case("avx512vpopcntdq", HasAVX512VPOPCNTDQ)
12021184
.Case("avx512vnni", HasAVX512VNNI)
12031185
.Case("avx512bf16", HasAVX512BF16)
1204-
.Case("avx512er", HasAVX512ER)
12051186
.Case("avx512fp16", HasAVX512FP16)
1206-
.Case("avx512pf", HasAVX512PF)
12071187
.Case("avx512dq", HasAVX512DQ)
12081188
.Case("avx512bitalg", HasAVX512BITALG)
12091189
.Case("avx512bw", HasAVX512BW)
@@ -1253,7 +1233,6 @@ bool X86TargetInfo::hasFeature(StringRef Feature) const {
12531233
.Case("pku", HasPKU)
12541234
.Case("popcnt", HasPOPCNT)
12551235
.Case("prefetchi", HasPREFETCHI)
1256-
.Case("prefetchwt1", HasPREFETCHWT1)
12571236
.Case("prfchw", HasPRFCHW)
12581237
.Case("ptwrite", HasPTWRITE)
12591238
.Case("raoint", HasRAOINT)

clang/lib/Basic/Targets/X86.h

-3
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo {
103103
bool HasAVX512VNNI = false;
104104
bool HasAVX512FP16 = false;
105105
bool HasAVX512BF16 = false;
106-
bool HasAVX512ER = false;
107-
bool HasAVX512PF = false;
108106
bool HasAVX512DQ = false;
109107
bool HasAVX512BITALG = false;
110108
bool HasAVX512BW = false;
@@ -136,7 +134,6 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo {
136134
bool HasCLWB = false;
137135
bool HasMOVBE = false;
138136
bool HasPREFETCHI = false;
139-
bool HasPREFETCHWT1 = false;
140137
bool HasRDPID = false;
141138
bool HasRDPRU = false;
142139
bool HasRetpolineExternalThunk = false;

clang/lib/Headers/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,10 @@ set(x86_files
153153
avx512bwintrin.h
154154
avx512cdintrin.h
155155
avx512dqintrin.h
156-
avx512erintrin.h
157156
avx512fintrin.h
158157
avx512fp16intrin.h
159158
avx512ifmaintrin.h
160159
avx512ifmavlintrin.h
161-
avx512pfintrin.h
162160
avx512vbmi2intrin.h
163161
avx512vbmiintrin.h
164162
avx512vbmivlintrin.h

0 commit comments

Comments
 (0)