forked from OSchip/llvm-project
[mlir] Use llvm::ElementCount when constructing an llvm splat vector.
This fixes a breakage after the LLVM API changed.
This commit is contained in:
parent
0ddba0bd59
commit
396a42d924
|
@ -113,7 +113,8 @@ llvm::Constant *ModuleTranslation::getLLVMConstant(llvm::Type *llvmType,
|
|||
if (!child)
|
||||
return nullptr;
|
||||
if (llvmType->isVectorTy())
|
||||
return llvm::ConstantVector::getSplat(numElements, child);
|
||||
return llvm::ConstantVector::getSplat(
|
||||
llvm::ElementCount(numElements, /*Scalable=*/false), child);
|
||||
if (llvmType->isArrayTy()) {
|
||||
auto arrayType = llvm::ArrayType::get(elementType, numElements);
|
||||
SmallVector<llvm::Constant *, 8> constants(numElements, child);
|
||||
|
|
Loading…
Reference in New Issue