[clang] [lld] [llvm] [RISCV] Make A implies Zaamo and Zalrsc (PR #116907)
Sam Elliott via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 20 05:18:18 PST 2024
================
@@ -203,9 +203,28 @@ def HasStdExtM : Predicate<"Subtarget->hasStdExtM()">,
// Atomic Extensions
+def FeatureStdExtZaamo
+ : RISCVExtension<"zaamo", 1, 0,
+ "'Zaamo' (Atomic Memory Operations)">;
+def HasStdExtAOrZaamo
+ : Predicate<"Subtarget->hasStdExtZaamo()">,
+ AssemblerPredicate<(any_of FeatureStdExtZaamo),
+ "'A' (Atomic Instructions) or "
+ "'Zaamo' (Atomic Memory Operations)">;
----------------
lenary wrote:
```suggestion
def HasStdExtZaamo
: Predicate<"Subtarget->hasStdExtZaamo()">,
AssemblerPredicate<(any_of FeatureStdExtZaamo),
"'Zaamo' (Atomic Memory Operations)">;
```
Can we (eventually) do this cleanup (and similar for `HasStdExtAOrZalrsc`). Probably not in this PR, but it's nicer when the names and descriptions of the predicates line up closer with the extensions.
https://github.com/llvm/llvm-project/pull/116907
More information about the cfe-commits
mailing list