[Mlir-commits] [mlir] [mlir][LLVM] Prevent vector bit-width overflow (PR #220898)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Fri Sep 4 06:26:48 PDT 2026
================
@@ -1589,9 +1589,13 @@ def LLVM_vector_insert
"type($srcvec) `into` type($res)";
let extraClassDeclaration = [{
uint64_t getVectorBitWidth(Type vector) {
- return getVectorNumElements(vector).getKnownMinValue() *
- ::llvm::cast<VectorType>(vector).getElementType()
- .getIntOrFloatBitWidth();
+ auto vectorType = ::llvm::cast<VectorType>(vector);
+ uint64_t numElements = vectorType.getDimSize(0);
----------------
ftynse wrote:
don't we support scaled vectors in the llvm dialect?
https://github.com/llvm/llvm-project/pull/220898
More information about the Mlir-commits
mailing list