[llvm] Reland "[AArch64][SME] Split SMECallAttrs out of SMEAttrs" (PR #138671)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Wed May 14 02:21:35 PDT 2025
================
@@ -126,27 +123,83 @@ class SMEAttrs {
bool isPreservesZT0() const {
return decodeZT0State(Bitmask) == StateValue::Preserved;
}
- bool isUndefZT0() const { return Bitmask & ZT0_Undef; }
+ bool hasUndefZT0() const { return Bitmask & ZT0_Undef; }
bool sharesZT0() const {
StateValue State = decodeZT0State(Bitmask);
return State == StateValue::In || State == StateValue::Out ||
State == StateValue::InOut || State == StateValue::Preserved;
}
bool hasZT0State() const { return isNewZT0() || sharesZT0(); }
- bool requiresPreservingZT0(const SMEAttrs &Callee) const {
- return hasZT0State() && !Callee.isUndefZT0() && !Callee.sharesZT0() &&
- !Callee.hasAgnosticZAInterface();
+
+ SMEAttrs operator|(SMEAttrs Other) const {
+ SMEAttrs Merged(*this);
+ Merged.set(Other.Bitmask, /*Enable=*/true);
----------------
sdesmalen-arm wrote:
nit:
```suggestion
Merged.set(Other.Bitmask);
```
https://github.com/llvm/llvm-project/pull/138671
More information about the llvm-commits
mailing list