[all-commits] [llvm/llvm-project] 0dd282: [mlir][Vector] Tighten up application conditions i...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Thu Jun 12 07:48:15 PDT 2025


  Branch: refs/heads/users/nico/transfer-read-after-write-broadcast-tightening
  Home:   https://github.com/llvm/llvm-project
  Commit: 0dd282f5f618d51bc465d482a3f478c170793247
      https://github.com/llvm/llvm-project/commit/0dd282f5f618d51bc465d482a3f478c170793247
  Author: Nicolas Vasilache <nicolasvasilache at users.noreply.github.com>
  Date:   2025-06-12 (Thu, 12 Jun 2025)

  Changed paths:
    M mlir/lib/Dialect/Vector/IR/VectorOps.cpp
    M mlir/test/Dialect/Vector/canonicalize.mlir

  Log Message:
  -----------
  [mlir][Vector] Tighten up application conditions in TransferReadAfterWriteToBroadcast

The pattern would previously apply in spurious cases and generate incorrect IR.

In the process, we disable the application of this pattern in the case where there is no broadcast; this should be handled separately and may more easily support masking.

The case {no-broadcast, yes-transpose} was previously caught by this pattern and arguably could also generate incorrect IR (and was also untested): this case does not apply anymore.

The last cast {yes-broadcast, yes-transpose} continues to apply but should arguably be removed from the future because creating transposes as part of canonicalization feels dangerous.
There are other patterns that move permutation logic:

- either into the transfer, or
- outside of the transfer

Ideally, this would be target-dependent and not a canonicalization (i.e. does your DMA HW allow transpose on the fly or not) but this is beyond the scope of this PR.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list