[all-commits] [llvm/llvm-project] cf60d3: [mlir][arith] Extend the `floordivsi` converter

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Fri Mar 24 01:49:34 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cf60d3f1a688671c8eb7859bf0572c403c3c0cca
      https://github.com/llvm/llvm-project/commit/cf60d3f1a688671c8eb7859bf0572c403c3c0cca
  Author: Andrzej Warzynski <andrzej.warzynski at gmail.com>
  Date:   2023-03-24 (Fri, 24 Mar 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Arith/Transforms/Passes.td
    M mlir/lib/Dialect/Arith/Transforms/ExpandOps.cpp
    M mlir/test/Dialect/Arith/expand-ops.mlir

  Log Message:
  -----------
  [mlir][arith] Extend the `floordivsi` converter

This patch extends the `createConst` method so that it can generate
constant vectors (it can already generate scalars). This change is
required to be able to apply the converter for `arith.floordivsi`
(i.e. `FloorDivSIOpConverter`) to vectors.

While `arith.floordivsi` is my main motivation for this change, this
patch should also allow other Arith ops to be converted in vector cases.
In my example, the Linalg vectorizer updates `arith.floordivsi` to
operate on vectors and hence the need for this change.

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




More information about the All-commits mailing list