[PATCH] D83079: [clang][aarch64] Generate preprocessor macros for -march=armv8.6a+sve.

Francesco Petrogalli via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 8 07:20:46 PDT 2020


fpetrogalli marked 2 inline comments as done.
fpetrogalli added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:369
+  if (llvm::is_contained(Features, "+v8.6a")) {
+    if (!llvm::is_contained(Features, "-i8mm") &&
+        !llvm::is_contained(Features, "+noi8mm"))
----------------
sdesmalen wrote:
> Is this correct and/or necessary? I would expect LLVM to just handle features in the order they're passed, and the architecture version is always processed first, e.g. `-march=armv8.6-a+noi8mm` will always first process `armv8.6a` before processing features like `noi8mm`.
I was expecting that too, but in in this place the `+i8mm` is added after whatever the user have passed to -march, which means that without this extra check the user input `-mattr=armv8.6a+sve+noimm8` becomes broken because we are adding `-target-feature=+i8mm` after `-i8mm`.  This behavior is guarded by a regression tests that starts failing if I don't use these extra checks. This was not needed in the original place were I added the functionality because the `+i8mm` was being added right after `+v8.6a` and before splitting up the `+sve+noi8mm`, so that the user input was the one (un)setting the feature.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83079





More information about the cfe-commits mailing list