[llvm] [AArch64] Check for streaming mode in HasSME* features. (PR #96302)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 21 10:23:45 PDT 2024


================
@@ -4834,7 +4839,7 @@ void AArch64InstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
     if (AArch64::FPR16RegClass.hasSubClassEq(RC))
       Opc = AArch64::STRHui;
     else if (IsPNR || AArch64::PPRRegClass.hasSubClassEq(RC)) {
-      assert(Subtarget.hasSVEorSME() &&
+      assert(Subtarget.isSVEorStreamingSVEAvailable() &&
              "Unexpected register store without SVE store instructions");
       assert((!IsPNR || Subtarget.hasSVE2p1() || Subtarget.hasSME2()) &&
              "Unexpected register store without SVE2p1 or SME2");
----------------
paulwalker-arm wrote:

FYC: I don't think this really matters and the code can be simplified to just 
```
else if (AArch64::PPRRegClass.hasSubClassEq(RC) ||
            AArch64::PNRRegClass.hasSubClassEq(RC))
```
I say this because I see no need for an assert for something that just works. If somebody hits it and there's no other failures then they just (rightfully in my view) remove it.

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


More information about the llvm-commits mailing list