diff options
author | Krzysztof Drewniak <Krzysztof.Drewniak@amd.com> | 2025-07-29 09:40:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-29 09:40:49 -0700 |
commit | 330a7e1136f536bf7cd642e460734d0bd6e0d0bb (patch) | |
tree | badbcc81ee86266a1cf3b5deee1e4caf54582588 /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | a1aba84c2bc23d98a25e265678dd4752f78c5b3f (diff) | |
download | llvm-330a7e1136f536bf7cd642e460734d0bd6e0d0bb.zip llvm-330a7e1136f536bf7cd642e460734d0bd6e0d0bb.tar.gz llvm-330a7e1136f536bf7cd642e460734d0bd6e0d0bb.tar.bz2 |
[mlir][Vector] Make elementwise-on-broadcast sinking handle splat consts (#150867)
There is a pattern that rewrites
elementwise_op(broadcast(x1 : T to U), broadcast(x2 : T to U), ...) to
broadcast(elementwise_op(x1, x2, ...) : T to U).
This pattern did not, however, account for the case where a broadcast
constant is represented as a SplatElementsAttr, which can safely be
reshaped or scalarized but is not a `vector.broadcast` or `vector.splat`
operation.
This patch fixes this oversight, prenting premature broadcasting.
This did result in the need to update some linalg dialect tests, which
now feature a less-broadcast computation and/or more constant folding.
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions