[MLIR] Lower `shape.reduce` to `scf.for` only when argument is `tensor<?xindex>`
authorFrederik Gossen <frgossen@google.com>
Thu, 16 Jul 2020 13:55:08 +0000 (13:55 +0000)
committerFrederik Gossen <frgossen@google.com>
Thu, 16 Jul 2020 13:55:48 +0000 (13:55 +0000)
commit67391a7045486c5d82b763dc1c32dba6d99ee31a
tree1d6cb33c67d7aa82d3b2d06d00309d6c7dfd4aca
parent0eb50e614c65d189a3f1bdf747be973829046bc1
[MLIR] Lower `shape.reduce` to `scf.for` only when argument is `tensor<?xindex>`

To make it clear when shape error values cannot occur the shape operations can
operate on extent tensors. This change updates the lowering for `shape.reduce`
accordingly.

Differential Revision: https://reviews.llvm.org/D83944
mlir/lib/Conversion/ShapeToSCF/ShapeToSCF.cpp
mlir/test/Conversion/ShapeToSCF/shape-to-scf.mlir