[Mlir-commits] [mlir] [mlir][Vector] add vector.insert canonicalization pattern to convert a chain of insertions to vector.from_elements (PR #142944)
Kunwar Grover
llvmlistbot at llvm.org
Thu Aug 21 06:06:46 PDT 2025
Groverkss wrote:
> And then the other pattern applies and folds this into returning %arg0. I believe that pattern is wrong and should only be applied if the base argument is the same (so that we read and write to/from the same memory). Given this PR only triggers this potential bug, I guess I will have to look into fixing this myself.
The pattern is applying correctly. tensors have value semantics, there is no "memory" here. The transfer_write here does a complete overlap on the destination, so we can fold completly here without needing to use the destination tensor values.
https://github.com/llvm/llvm-project/pull/142944
More information about the Mlir-commits
mailing list