diff options
author | James Newling <james.newling@gmail.com> | 2025-04-16 10:08:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-16 13:08:36 -0400 |
commit | 0daf20b3605f19271af7afa4175e7d62194e5578 (patch) | |
tree | 6bb4058e564e6fd24abc52fdb1425b80f6feaa63 /llvm/lib/Bitcode | |
parent | ed9bcb52954f8e6171563d2b8310b0ca6d03d655 (diff) | |
download | llvm-0daf20b3605f19271af7afa4175e7d62194e5578.zip llvm-0daf20b3605f19271af7afa4175e7d62194e5578.tar.gz llvm-0daf20b3605f19271af7afa4175e7d62194e5578.tar.bz2 |
[mlir][vector] transpose(broadcast) -> broadcast canonicalization (#135096)
Example seen in the 'real world':
```
%0 = vector.broadcast %arg0 : vector<1xi8> to vector<1x8xi8>
%1 = vector.transpose %0, [1, 0] : vector<1x8xi8> to vector<8x1xi8>
```
This PR adds a canonicalizer that rewrites the above as
```
%1 = vector.broadcast %arg0 : vector<1xi8> to vector<8x1xi8>
```
It works by determining if a transpose is only shuffling contiguous
broadcast dimensions.
Diffstat (limited to 'llvm/lib/Bitcode')
0 files changed, 0 insertions, 0 deletions