[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


================
@@ -0,0 +1,17 @@
+// Check that explicit -mcpu=<cpu>+no<feature> preserves -<feature> option and removes the feature when the feature is implied by the CPU or its base architecture. 
+// SVE and RandGen are default features of neoverse-v2 (defined in AArch64Processors.td).
+// SVE and SB are default features of armv9 (defined in AArch64Features.td).
+// SHA2 is not part of the default feature set for either Neoverse V2 or Armv9.
----------------
tommat01 wrote:

Since addCPUDefaults is also used by the `target` attribute flow, please could you add the same set of tests for that? See `clang/test/CodeGen/AArch64/targetattr.c` for example.

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


More information about the cfe-commits mailing list