[all-commits] [llvm/llvm-project] 8dace2: [mlir][VectorToSCF] Bug in TransferRead lowering f...

Jakub Lichman via All-commits all-commits at lists.llvm.org
Wed Aug 19 08:35:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8dace28f92056a04e02d913684d3f448ee1f295a
      https://github.com/llvm/llvm-project/commit/8dace28f92056a04e02d913684d3f448ee1f295a
  Author: Jakub Lichman <limo at google.com>
  Date:   2020-08-19 (Wed, 19 Aug 2020)

  Changed paths:
    M mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
    M mlir/test/Conversion/VectorToSCF/vector-to-loops.mlir

  Log Message:
  -----------
  [mlir][VectorToSCF] Bug in TransferRead lowering fixed

If Memref has rank > 1 this pass emits N-1 loops around
TransferRead op and transforms the op itself to 1D read. Since vectors
must have static shape while memrefs don't the pass emits if condition
to prevent out of bounds accesses in case some memref dimension is smaller
than the corresponding dimension of targeted vector. This logic is fine
but authors forgot to apply `permutation_map` on loops upper bounds and
thus if condition compares induction variable to incorrect loop upper bound
(dimension of the memref) in case `permutation_map` is not identity map.
This commit aims to fix that.




More information about the All-commits mailing list