[PATCH] D80304: [mlir] Canonicalization of shape.cstr_broadcastable
Stephan Herhut via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 25 05:19:27 PDT 2020
herhut accepted this revision.
herhut added a comment.
I am fine with this to land and make the transition to folding later.
================
Comment at: mlir/lib/Dialect/Shape/IR/Shape.cpp:263
+namespace {
+// TODO: Add a case for unknown shapes that are still defined by the same
+// operation.
----------------
Would a simple `op.lhs() == op.rhs()` work?
================
Comment at: mlir/lib/Dialect/Shape/IR/Shape.cpp:272
+ // Don't try to compare equality when the shapes are not constant.
+ auto lhs = op.getOperand(0).getDefiningOp<ConstShapeOp>();
+ auto rhs = op.getOperand(1).getDefiningOp<ConstShapeOp>();
----------------
`getOperand(0)`->`lhs()`?
`getOperand(1)`->`rhs()`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80304/new/
https://reviews.llvm.org/D80304
More information about the llvm-commits
mailing list