Skip to content

Commit ec72ea8

Browse files
committed
Always append "-evex512" for "no-evex512" feature
1 parent d072431 commit ec72ea8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/lib/Basic/Targets/X86.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ bool X86TargetInfo::initFeatureMap(
122122
std::vector<std::string> UpdatedAVX10FeaturesVec;
123123
enum { FE_NOSET = -1, FE_FALSE, FE_TRUE };
124124
int HasEVEX512 = FE_NOSET;
125-
bool HasAVX512F = Features["avx512f"];
125+
bool HasAVX512F = false;
126126
bool HasAVX10 = false;
127127
bool HasAVX10_512 = false;
128128
std::string LastAVX10;
@@ -180,6 +180,8 @@ bool X86TargetInfo::initFeatureMap(
180180
Diags.Report(diag::warn_invalid_feature_combination)
181181
<< LastAVX10 + (HasEVEX512 == FE_TRUE ? " +evex512" : " -evex512");
182182
UpdatedFeaturesVec.push_back(HasAVX10_512 ? "+evex512" : "-evex512");
183+
} else if (HasEVEX512 == FE_FALSE) {
184+
UpdatedFeaturesVec.push_back("-evex512");
183185
}
184186

185187
if (!TargetInfo::initFeatureMap(Features, Diags, CPU, UpdatedFeaturesVec))

0 commit comments

Comments
 (0)