[all-commits] [llvm/llvm-project] d6b499: [mlir][MemRef] Fix canonicalization of BufferCast(...

Adrian Kuegel via All-commits all-commits at lists.llvm.org
Thu Aug 5 23:33:08 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d6b4993736c2b2e52f1417c72e0f34bba5b5b40e
      https://github.com/llvm/llvm-project/commit/d6b4993736c2b2e52f1417c72e0f34bba5b5b40e
  Author: Adrian Kuegel <akuegel at google.com>
  Date:   2021-08-06 (Fri, 06 Aug 2021)

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

  Log Message:
  -----------
  [mlir][MemRef] Fix canonicalization of BufferCast(TensorLoad).

CastOp::areCastCompatible does not check whether casts are definitely compatible.
When going from dynamic to static offset or stride, the canonicalization cannot
know whether it is really cast compatible. In that case, it can only canonicalize
to an alloc plus copy.

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




More information about the All-commits mailing list