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

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Thu Jun 12 05:58:31 PDT 2025


  Branch: refs/heads/users/nico/transfer-read-after-write-broadcast-tightening
  Home:   https://github.com/llvm/llvm-project
  Commit: 0210067bd7a4bd47fa18cb8107f29c23dbd6a523
      https://github.com/llvm/llvm-project/commit/0210067bd7a4bd47fa18cb8107f29c23dbd6a523
  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