diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp --- a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp +++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp @@ -1901,8 +1901,9 @@ Value v1, Value v2, ArrayAttr mask, ArrayRef attrs) { auto containerType = v1.getType(); - auto vType = LLVM::getFixedVectorType( - LLVM::getVectorElementType(containerType), mask.size()); + auto vType = LLVM::getVectorType( + LLVM::getVectorElementType(containerType), mask.size(), + containerType.cast().isScalable()); build(b, result, vType, v1, v2, mask); result.addAttributes(attrs); } @@ -1934,8 +1935,9 @@ if (!LLVM::isCompatibleVectorType(typeV1)) return parser.emitError( loc, "expected LLVM IR dialect vector type for operand #1"); - auto vType = LLVM::getFixedVectorType(LLVM::getVectorElementType(typeV1), - maskAttr.size()); + auto vType = + LLVM::getVectorType(LLVM::getVectorElementType(typeV1), maskAttr.size(), + typeV1.cast().isScalable()); result.addTypes(vType); return success(); }