[PATCH] D141411: [AArch64] Make -march and target("arch=..") attributes imply dependent features

Dave Green via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 11 08:47:05 PST 2023


dmgreen added a comment.

In D141411#4042891 <https://reviews.llvm.org/D141411#4042891>, @lenary wrote:

> Can we check this logic, especially around adding both AEK_SVE and AEK_SVE2 in the `AARCH64_ARCH` descriptions, this means that `-march=armv9-a+nosve2` still can generate sve instructions. I'm not entirely sure of the intended behaviour there, especially as sve2 should maybe imply sve by other means (iirc, there's a place higher up in AArch64TargetParser.def with the implied features?)

Hello. I would expect `-march=armv9-a+nosve2` to still enable sve, and as far as I can tell (correct me if I'm wrong!) that is how this worked both before and after this patch. There is some code in the driver that already adds +sve and +sve2 TargetFeatures if the architecture is v9a. A lot of that code in the Driver shouldn't really be in their though, as it won't apply to `target("arch=..")` attributes correctly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141411/new/

https://reviews.llvm.org/D141411



More information about the cfe-commits mailing list