[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

David Spickett via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 18 06:04:31 PDT 2024


================
@@ -19,3 +19,19 @@
 // RUN: %clang --target=arm64 -mlittle-endian -march=armv8.1a -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERICV81A %s
 // RUN: %clang --target=arm64 -mlittle-endian -march=armv8.1-a -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERICV81A %s
 // ARM64-GENERICV81A: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "generic"{{.*}} "-target-feature" "+v8.1a"{{.*}} "-target-feature" "+neon"
+
+// ===== Architecture extensions =====
+
+// RUN: %clang -target aarch64 -march=armv8.1-a --print-enabled-extensions 2>&1 | FileCheck -check-prefix=ARCH-EXTENSION --implicit-check-not FEAT_ %s
+// ARCH-EXTENSION: FEAT_ETE
----------------
DavidSpickett wrote:

> the implications between them are not very clear

True. The visual difference might be `+whatever` but the user doesn't know what that requires or implies.

Leave it as is and if anyone actually finds it useful they can add the `+...` themselves. I don't have an immediate use case myself.

Just being able to compare 1 compiler command line against a technical reference manual is already an improvement.

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


More information about the cfe-commits mailing list