diff options
author | Benjamin Maxwell <benjamin.maxwell@arm.com> | 2023-12-01 14:24:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-01 14:24:36 +0000 |
commit | f42b7615b862bb5f77981f619f92877eb20adf54 (patch) | |
tree | 403c3707cd8e375bc16ac3ea97d2ea209298469d /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | f19571ee781de932390e8983267263f504e99e1f (diff) | |
download | llvm-f42b7615b862bb5f77981f619f92877eb20adf54.zip llvm-f42b7615b862bb5f77981f619f92877eb20adf54.tar.gz llvm-f42b7615b862bb5f77981f619f92877eb20adf54.tar.bz2 |
[mlir][Vector] Add fold transpose(shape_cast) -> shape_cast (#73951)
This folds transpose(shape_cast) into a new shape_cast, when the
transpose just permutes a unit dim from the result of the shape_cast.
Example:
```
%0 = vector.shape_cast %vec : vector<[4]xf32> to vector<[4]x1xf32>
%1 = vector.transpose %0, [1, 0] : vector<[4]x1xf32> to vector<1x[4]xf32>
```
Folds to:
```
%0 = vector.shape_cast %vec : vector<[4]xf32> to vector<1x[4]xf32>
```
This is an (alternate) fix for lowering matmuls to ArmSME.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions