This is an archive of the discontinued LLVM Phabricator instance.

[mlir][std] Fold dim(dynamic_tensor_from_elements, %cst)
ClosedPublic

Authored by herhut on Nov 17 2020, 4:39 AM.

Details

Summary

The shape of the result of a dynamic_tensor_from_elements is defined via its
result type and operands. We already fold dim operations when they reference
one of the statically sized dimensions. Now, also fold dim on the dynamically
sized dimensions by picking the corresponding operand.

Diff Detail

Event Timeline

herhut created this revision.Nov 17 2020, 4:39 AM
herhut requested review of this revision.Nov 17 2020, 4:39 AM
ftynse accepted this revision.Nov 17 2020, 5:32 AM
This revision is now accepted and ready to land.Nov 17 2020, 5:32 AM
This revision was automatically updated to reflect the committed changes.