[llvm] [RISCV][GISEL] Add support for lowerFormalArguments that contain scalable vector types (PR #70882)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 2 19:21:43 PDT 2023


================
@@ -1435,7 +1435,7 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
     if (DstTy.getElementType() != SrcEltTy)
       report("G_BUILD_VECTOR result element type must match source type", MI);
 
-    if (DstTy.getNumElements() != MI->getNumOperands() - 1)
+    if (DstTy.getElementCount().getKnownMinValue() > MI->getNumOperands() - 1)
       report("G_BUILD_VECTOR must have an operand for each elemement", MI);
----------------
michaelmaitland wrote:

I will update this. I guess it is the case that G_BUILD_VECTOR cannot work for scalable vectors unless both Src and Dest types are scalable vectors and `N * T1 * NumDests = M * T2`? But that is a story for a different PR. I will revert this change here.

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


More information about the llvm-commits mailing list