This is an archive of the discontinued LLVM Phabricator instance.

Limit cast folding for memref.collapse_shape
AbandonedPublic

Authored by cathyzhyi on Jul 23 2021, 3:47 PM.

Details

Reviewers
nicolasvasilache
Summary

memref.collapse_shape has verification logic to make sure
result dim must be static if all the collapsing src dims are static.
Cast folding might add more static information for the src operand
of memref.collapse_shape which might change a valid collapsing
operation to be invalid. This change does cast folding only when
the collapsed result type stays the same.

Minor changes to convertReassociationIndicesToExprs to use context
instead of builder to avoid extra steps to construct temporary
builders.

Diff Detail

Event Timeline

cathyzhyi created this revision.Jul 23 2021, 3:47 PM
cathyzhyi requested review of this revision.Jul 23 2021, 3:47 PM
cathyzhyi abandoned this revision.Jul 23 2021, 3:48 PM