This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Shape] Canonicalize casted extent tensor operands
ClosedPublic

Authored by frgossen on Apr 27 2021, 9:17 AM.

Details

Summary

Both, shape.broadcast and shape.cstr_broadcastable accept dynamic and static
extent tensors. If their operands are casted, we can use the original value
instead.

Diff Detail

Event Timeline

frgossen created this revision.Apr 27 2021, 9:17 AM
frgossen requested review of this revision.Apr 27 2021, 9:17 AM
pifon2a accepted this revision.Apr 27 2021, 9:24 AM
pifon2a added inline comments.
mlir/lib/Dialect/Shape/IR/Shape.cpp
756

Casted?

mlir/test/Dialect/Shape/canonicalize.mlir
1346

nit: i think "casted" is an incorrect form. Shouldn't it be just "cast"?

This revision is now accepted and ready to land.Apr 27 2021, 9:24 AM
frgossen updated this revision to Diff 341114.Apr 28 2021, 2:50 AM
frgossen marked 2 inline comments as done.

Address comments

This revision was landed with ongoing or failed builds.Apr 28 2021, 2:52 AM
This revision was automatically updated to reflect the committed changes.