This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Add canoncalization for `shape.is_broadcastable`
ClosedPublic

Authored by frgossen on Mar 10 2021, 10:20 AM.

Details

Summary

Canonicalize is_broadcastable to constant true if fewer than 2 unique shape
operands. Eliminate redundant operands, otherwise.

Diff Detail

Event Timeline

frgossen created this revision.Mar 10 2021, 10:20 AM
frgossen requested review of this revision.Mar 10 2021, 10:20 AM
bkramer added inline comments.Mar 10 2021, 10:47 AM
mlir/lib/Dialect/Shape/IR/Shape.cpp
792

llvm::is_contained

bkramer accepted this revision.Mar 10 2021, 10:47 AM
frgossen updated this revision to Diff 329870.Mar 11 2021, 1:09 AM

Address comment

frgossen marked an inline comment as done.Mar 11 2021, 1:10 AM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 11 2021, 1:11 AM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.