[mlir] Don't allow dynamic extent tensor types for ConstShapeOp.
authorAdrian Kuegel <akuegel@google.com>
Tue, 5 Oct 2021 12:37:30 +0000 (14:37 +0200)
committerAdrian Kuegel <akuegel@google.com>
Thu, 7 Oct 2021 08:56:16 +0000 (10:56 +0200)
commit2bb208ddfd700f0fdd3028f83eecd280a8d6f3b5
treee7d4a61cd507782ef262e479e715df438f274184
parent14cb138b15adafe7d4a1cd7cb2e836c40a5957b5
[mlir] Don't allow dynamic extent tensor types for ConstShapeOp.

ConstShapeOp has a constant shape, so its type can always be static.
We still allow it to have ShapeType though.

Differential Revision: https://reviews.llvm.org/D111139
mlir/lib/Dialect/Shape/IR/Shape.cpp
mlir/lib/Dialect/Shape/IR/ShapeCanonicalization.td
mlir/test/Dialect/Shape/canonicalize.mlir
mlir/test/Dialect/Shape/ops.mlir