This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Fix subview verifier.
ClosedPublic

Authored by nicolasvasilache on Jan 24 2021, 12:28 PM.

Details

Summary

The subview verifier in the rank-reduced case is plainly skipping verification
when the resulting type is a memref with empty affine map. This is generally incorrect.

Instead, form the actual expected rank-reduced MemRefType that takes into account the projections of 1's dimensions. Then, check the canonicalized expected rank-reduced type against the canonicalized candidate type.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Jan 24 2021, 12:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2021, 12:28 PM
ftynse accepted this revision.Jan 25 2021, 1:24 AM
ftynse added inline comments.
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
3128–3129

Overly eager replacement?

This revision is now accepted and ready to land.Jan 25 2021, 1:24 AM
This revision was automatically updated to reflect the committed changes.