[llvm-branch-commits] [clang] [llvm] [AArch64] Add a check for invalid default features (PR #104752)

David Spickett via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 19 03:30:47 PDT 2024


DavidSpickett wrote:

This needs a summary on the impact of not including the change, for folks who are not familiar with Arm's extension details.

> This resulted in a bug where if a feature was marked as Implies but was not added to DefaultExt, then for -march=base_arch+nofeat the Driver would consider feat to have never been added and therefore would do nothing to disable it (no -target-feature -feat would be added, but the backend would enable the feature by default because of Implies). See
clang/test/Driver/aarch64-negative-modifiers-for-default-features.c.

So I think the impact is:
This could result in a binary including instructions from extensions that the user has explicitly requested be disabled. This binary will fault at runtime on hardware that does not have these extensions.

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


More information about the llvm-branch-commits mailing list