[all-commits] [llvm/llvm-project] 89d555: [mlir][tosa] Add constant folding for tosa.slice

Rob Suderman via All-commits all-commits at lists.llvm.org
Wed Aug 24 15:35:00 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89d555134aa1bf6f80aea3043354166cdaaae016
      https://github.com/llvm/llvm-project/commit/89d555134aa1bf6f80aea3043354166cdaaae016
  Author: Rob Suderman <suderman at google.com>
  Date:   2022-08-24 (Wed, 24 Aug 2022)

  Changed paths:
    M mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
    M mlir/test/Dialect/Tosa/constant-op-fold.mlir

  Log Message:
  -----------
  [mlir][tosa] Add constant folding for tosa.slice

If the input to a tosa.slice operation is a splat we can just replace with
another splat. If the result is a single element, replacing with a splat
is universally useful.

Reviewed By: NatashaKnk

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




More information about the All-commits mailing list