[all-commits] [llvm/llvm-project] 5cebff: [mlir][Vector] Update the lowering of `vector.tran...

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Fri Jun 30 12:15:20 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5cebffc276e6fc34f754151bd0511bd59ca6f562
      https://github.com/llvm/llvm-project/commit/5cebffc276e6fc34f754151bd0511bd59ca6f562
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
    M mlir/test/Conversion/VectorToSCF/vector-to-scf.mlir

  Log Message:
  -----------
  [mlir][Vector] Update the lowering of `vector.transfer_write` to SCF

This change updates the lowering of `vector.transfer_write` to SCF when
scalable vectors are used. Specifically, when lowering
`vector.transfer_write` to a loop of `vector.extractelement` ops, make
sure that the upper bound of the generated loop is scaled by
`vector.vscale`:
```
    %10 = vector.vscale
    %11 = arith.muli %10, %c16 : index
    scf.for %arg2 = %c0 to %11 step %c1
```

For reference, this is the current version (i.e. before this change):
```
    scf.for %arg2 = %c0 to %c16 step %c1
```
Note that this only valid for fixed-width vectors.

Differential Revision: https://reviews.llvm.org/D154226




More information about the All-commits mailing list