[Mlir-commits] [mlir] [mlir][ABI] Fix scalable vector mapping in ABITypeMapper (PR #206617)
Federico Bruzzone
llvmlistbot at llvm.org
Tue Jun 30 05:03:16 PDT 2026
================
@@ -75,7 +75,9 @@ const llvm::abi::Type *ABITypeMapper::mapVectorType(mlir::VectorType type) {
for (int64_t dim : shape)
totalElements *= dim;
- llvm::ElementCount ec = llvm::ElementCount::getFixed(totalElements);
+ llvm::ElementCount ec = type.isScalable()
+ ? llvm::ElementCount::getScalable(totalElements)
+ : llvm::ElementCount::getFixed(totalElements);
----------------
FedericoBruzzone wrote:
We could use:
```suggestion
llvm::ElementCount ec = llvm::ElementCount::get(totalElements, type.isScalable());
```
https://github.com/llvm/llvm-project/pull/206617
More information about the Mlir-commits
mailing list