[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


================
@@ -26375,12 +26375,20 @@ bool AArch64TargetLowering::shouldLocalize(
   return TargetLoweringBase::shouldLocalize(MI, TTI);
 }
 
+static bool isScalableTySupported(const unsigned Op) {
+  return Op == Instruction::Load || Op == Instruction::Store;
+}
+
 bool AArch64TargetLowering::fallBackToDAGISel(const Instruction &Inst) const {
-  if (Inst.getType()->isScalableTy())
-    return true;
+  const auto ScalableTySupported = isScalableTySupported(Inst.getOpcode());
+
+  // Fallback for scalable vectors
+  if (Inst.getType()->isScalableTy() && !ScalableTySupported) {
----------------
dc03-work wrote:

We also need to distinguish between GlobalISel and FastISel here. FastISel also calls this function, and it doesn't support scalable vectors. The patch you linked uses a command line flag to do this, but there is probably a better way than that.

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


More information about the llvm-commits mailing list