[llvm] [AArch64][SME] Use PNR Reg classes for predicate constraint (PR #67606)
Matthew Devereau via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 06:34:21 PDT 2023
================
@@ -10052,18 +10052,21 @@ static PredicateConstraint parsePredicateConstraint(StringRef Constraint) {
static const TargetRegisterClass *
getPredicateRegisterClass(PredicateConstraint Constraint, EVT VT) {
- if (!VT.isScalableVector() || VT.getVectorElementType() != MVT::i1)
+ if (VT != MVT::aarch64svcount &&
+ (!VT.isScalableVector() || VT.getVectorElementType() != MVT::i1))
return nullptr;
switch (Constraint) {
default:
return nullptr;
case PredicateConstraint::Uph:
- return &AArch64::PPR_p8to15RegClass;
+ return VT == MVT::aarch64svcount ? &AArch64::PNR_p8to15RegClass
+ : &AArch64::PPR_p8to15RegClass;
case PredicateConstraint::Upl:
- return &AArch64::PPR_3bRegClass;
+ return VT == MVT::aarch64svcount ? nullptr : &AArch64::PPR_3bRegClass;
----------------
MDevereau wrote:
I'll do this as a follow up patch for the reasons you mentioned.
https://github.com/llvm/llvm-project/pull/67606
More information about the llvm-commits
mailing list