[clang] [llvm] [AArch64] Decouple feature dependency expansion. (PR #94279)

Alexandros Lamprineas via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 02:07:02 PDT 2024


================
@@ -166,6 +174,11 @@ void AArch64::ExtensionSet::enable(ArchExtKind E) {
   Touched.set(E);
   Enabled.set(E);
 
+  // These depend on each other, meaning you can't have one without the other.
+  // We don't want this to be in ExtensionDependencies to avoid infinite loops.
+  if (E == AEK_FP)
+    enable(AEK_SIMD);
----------------
labrinea wrote:

Not unrelated. To be fair we should also disable FP when SIMD is disabled. That will make `Clang :: Preprocessor/aarch64-target-features.c` fail but I can fix it. My argument is that since this is a dependency for FMV why would it not be for everything else? Why treat the attributes `target` and `target_version` differently in terms of the backend features we want to enable? Similarly the command line. This is another example of inconsistency. Either remove the dependency from FMV or be consisitent about it everywhere (march, target, target_version, etc).

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


More information about the llvm-commits mailing list