[Mlir-commits] [mlir] [mlir][Vector] Add `vector.to_elements` op (PR #141457)

Kazu Hirata llvmlistbot at llvm.org
Wed Jun 18 13:54:41 PDT 2025


kazutakahirata wrote:

@dcaballe I'm getting warnings like:

```
tools/mlir/include/mlir/Dialect/Vector/IR/VectorOps.cpp.inc:4765:104: error: comparison of integers of different signs: 'int64_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
 4765 |   if (!(((llvm::cast<::mlir::ShapedType>((*this->getODSResults(0).begin()).getType()).getNumElements() == this->getODSOperands(0).getTypes().size())) && ((::llvm::all_of(this->getODSOperands(0).getTypes(), [&](::mlir::Type t) { return t == getElementTypeOrSelf((*this->getODSResults(0).begin())); })))))
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/mlir/include/mlir/Dialect/Vector/IR/VectorOps.cpp.inc:13257:105: error: comparison of integers of different signs: 'int64_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
 13257 |   if (!(((llvm::cast<::mlir::ShapedType>((*this->getODSOperands(0).begin()).getType()).getNumElements() == this->getODSResults(0).getTypes().size())) && ((::llvm::all_of(this->getODSResults(0).getTypes(), [&](::mlir::Type t) { return t == getElementTypeOrSelf((*this->getODSOperands(0).begin())); })))))
       |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
```

Would you mind taking a look?  Thanks!


https://github.com/llvm/llvm-project/pull/141457


More information about the Mlir-commits mailing list