[all-commits] [llvm/llvm-project] 965ad7: [MLIR][MemRef] Only allow fold of cast for the poi...

William Moses via All-commits all-commits at lists.llvm.org
Tue Jun 8 08:43:55 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 965ad79ea7d0b98f905a27785a6fd0091b904218
      https://github.com/llvm/llvm-project/commit/965ad79ea7d0b98f905a27785a6fd0091b904218
  Author: William S. Moses <gh at wsmoses.com>
  Date:   2021-06-08 (Tue, 08 Jun 2021)

  Changed paths:
    M mlir/lib/Dialect/Affine/IR/AffineOps.cpp
    M mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
    M mlir/test/Dialect/Affine/canonicalize.mlir
    M mlir/test/Dialect/MemRef/canonicalize.mlir

  Log Message:
  -----------
  [MLIR][MemRef] Only allow fold of cast for the pointer operand, not the value

Currently canonicalizations of a store and a cast try to fold all casts into the store.

In the case where the operand being stored is itself a cast, this is illegal as the type of the value being stored
will change. This PR fixes this by not checking the value for folding with a cast.

Depends on https://reviews.llvm.org/D103828

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




More information about the All-commits mailing list