[all-commits] [llvm/llvm-project] 7e6fe5: [mlir] Fix subview verifier.

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Thu Jan 28 06:04:26 PST 2021

  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e6fe5c48a63c2a5b6ec963859070508115bf981
  Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
  Date:   2021-01-28 (Thu, 28 Jan 2021)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
    M mlir/lib/Dialect/StandardOps/IR/Ops.cpp
    M mlir/lib/IR/BuiltinTypes.cpp
    M mlir/test/IR/invalid-ops.mlir

  Log Message:
  [mlir] Fix subview verifier.

The subview verifier in the rank-reduced case is plainly skipping verification
when the resulting type is a memref with empty affine map. This is generally incorrect.

Instead, form the actual expected rank-reduced MemRefType that takes into account the projections of 1's dimensions. Then, check the canonicalized expected rank-reduced type against the canonicalized candidate type.

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

More information about the All-commits mailing list