[Mlir-commits] [mlir] [mlir][vector] Fold vector extract from insert when trailing unit dims (PR #192109)
Erick Ochoa Lopez
llvmlistbot at llvm.org
Wed Apr 15 09:51:59 PDT 2026
amd-eochoalo wrote:
I compared the pattern being matched here with your RFC and by the definition of implicit broadcast given on the RFC (and adapting it for vector.insert) I found and reported where they don't exactly match (and hence why I said that it didn't match that definition of implicit broadcast).
You can call it an implicit broadcast, but let me focus first on understanding which alternatives you are proposing. I went through the exercise above because of this comment:
> I wonder if insert shouldn't just follow extract here.
which I think the logic above shows that it already does follow the same logic. Please correct me if I'm wrong.
> Can we emit a shape_cast instead of a broadcast in your pattern when the type is a vector already?
I think that can be done since the test added shows that it will fold to a shape_cast.
https://github.com/llvm/llvm-project/pull/192109
More information about the Mlir-commits
mailing list