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

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 2 16:20:04 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);
----------------
topperc wrote:

How can a G_BUILD_VECTOR work for scalable vectors. The number of scalars needed isn't known at compile time.

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


More information about the llvm-commits mailing list