diff --git a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp --- a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp +++ b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp @@ -2184,7 +2184,7 @@ [&](LLVM::LLVMType llvmVectorTy, ValueRange operands) { auto splatAttr = SplatElementsAttr::get( mlir::VectorType::get( - {cast(llvmVectorTy.getUnderlyingType()) + {cast(llvmVectorTy.getUnderlyingType()) ->getNumElements()}, floatType), floatOne); 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 @@ -104,8 +104,9 @@ return parser.emitError(trailingTypeLoc, "expected LLVM IR dialect type"); if (argType.getUnderlyingType()->isVectorTy()) resultType = LLVMType::getVectorTy( - resultType, llvm::cast(argType.getUnderlyingType()) - ->getNumElements()); + resultType, + llvm::cast(argType.getUnderlyingType()) + ->getNumElements()); result.addTypes({resultType}); return success(); @@ -1815,7 +1816,8 @@ llvm::cast(getUnderlyingType())->getElementType()); } unsigned LLVMType::getVectorNumElements() { - return llvm::cast(getUnderlyingType())->getNumElements(); + return llvm::cast(getUnderlyingType()) + ->getNumElements(); } bool LLVMType::isVectorTy() { return getUnderlyingType()->isVectorTy(); } diff --git a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp --- a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp @@ -121,7 +121,7 @@ elementType = arrayTy->getElementType(); numElements = arrayTy->getNumElements(); } else { - auto *vectorTy = cast(llvmType); + auto *vectorTy = cast(llvmType); elementType = vectorTy->getElementType(); numElements = vectorTy->getNumElements(); }