[clang] [llvm] [AArch64][Driver] Fix behavior of +nofeat modifier on -mcpu (PR #203458)

Tomas Matheson via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 29 01:54:37 PDT 2026


================
@@ -340,14 +340,22 @@ void AArch64::ExtensionSet::disable(ArchExtKind E) {
       disable(Dep.Later);
 }
 
+static void setEnableIfMandatory(AArch64::ExtensionSet &Exts,
+                                 AArch64::ExtensionInfo E) {
+  if (Exts.BaseArch->DefaultExts.test(E.ID))
+    Exts.Enabled.set(E.ID);
----------------
tommat01 wrote:

I think this is too subtly different from calling `enable()`; it needs a comment saying that it is intentionally enabling the feature without marking it as touched, and why it is doing that.

https://github.com/llvm/llvm-project/pull/203458


More information about the cfe-commits mailing list