[mlir] Canonicalization and folding of shape.cstr_broadcastable
authorTres Popp <tpopp@google.com>
Wed, 20 May 2020 13:52:55 +0000 (15:52 +0200)
committerTres Popp <tpopp@google.com>
Fri, 5 Jun 2020 09:00:19 +0000 (11:00 +0200)
commit6aab70945915ef1d565f1146734416029549a5a9
tree818f116b2b665684e62faba7ebb111feb394b580
parent4a255bbd29698d9d5fbf05fd21ab78ca540365f2
[mlir] Canonicalization and folding of shape.cstr_broadcastable

This allows replacing of this op with a true witness in the case of both
inputs being const_shapes and being found to be broadcastable.

Differential Revision: https://reviews.llvm.org/D80304
mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
mlir/lib/Dialect/Shape/CMakeLists.txt
mlir/lib/Dialect/Shape/IR/Shape.cpp
mlir/lib/Dialect/Shape/IR/ShapeCanonicalization.td [new file with mode: 0644]
mlir/test/Dialect/Shape/canonicalize.mlir