[llvm] [AArch64][GISel] Support SVE with 128-bit min-size for G_LOAD and G_STORE (PR #92130)

Dhruv Chawla via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 08:16:15 PDT 2024


================
@@ -2906,9 +2927,23 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
     const LLT ValTy = MRI.getType(ValReg);
     const RegisterBank &RB = *RBI.getRegBank(ValReg, MRI, TRI);
 
+#ifndef NDEBUG
+    if (ValTy.isScalableVector()) {
+        assert(STI.hasSVE() 
+             && "Load/Store register operand is scalable vector "
+                "while SVE is not supported by the target");
+        // assert(RB.getID() == AArch64::SVRRegBankID 
+        //        && "Load/Store register operand is scalable vector "
+        //           "while its register bank is not SVR");
+    }
+#endif
----------------
dc03-work wrote:

You can remove the `#ifndef` and the commented assert (asserts are automatically disabled when  `LLVM_ENABLE_ASSERTIONS` is set to `OFF`)

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


More information about the llvm-commits mailing list