================
@@ -857,7 +857,28 @@ struct TLBI : SysAliasOptionalReg {
 
 namespace AArch64TLBIP {
 struct TLBIP : SysAliasOptionalReg {
-  using SysAliasOptionalReg::SysAliasOptionalReg;
+  bool AllowTLBID = false;
+
+  constexpr TLBIP(const char *N, uint16_t E, bool R, bool O, bool A,
+                  FeatureBitset F)
+      : SysAliasOptionalReg(N, E, R, O, F), AllowTLBID(A) {}
+  constexpr TLBIP(const char *N, uint16_t E, bool R, bool O, bool A)
+      : SysAliasOptionalReg(N, E, R, O), AllowTLBID(A) {}
+
+  bool allowTLBID() const { return AllowTLBID; }
+
+  bool haveFeatures(FeatureBitset ActiveFeatures) const {
+    if (ActiveFeatures[llvm::AArch64::FeatureAll])
+      return true;
+
+    FeatureBitset Required = FeaturesRequired;
----------------
jthackray wrote:

Unfortunately, your logic is too simple, since `FeaturesRequired` still 
contains both bits set for +d128 and +tlbid. We have to:
```
     Required.reset(llvm::AArch64::FeatureD128);
     Required.reset(llvm::AArch64::FeatureTLBID);
```
prior to the comparison otherwise we'll get `and` logic not `or`.

https://github.com/llvm/llvm-project/pull/178913
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to