This is an archive of the discontinued LLVM Phabricator instance.

[mlir][arith] Add narrowing patterns for index casts
ClosedPublic

Authored by kuhar on Apr 29 2023, 6:28 PM.

Details

Summary

These rely on the ValueBounds interace and its utility function to
compute constant bounds. This allows us to optimize linalg.index
values cast to integer types.

Diff Detail

Event Timeline

kuhar created this revision.Apr 29 2023, 6:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2023, 6:28 PM
kuhar requested review of this revision.Apr 29 2023, 6:28 PM
kuhar updated this revision to Diff 518737.May 2 2023, 8:05 AM

Rebase. Conservatively assume that unsigned index casts can be performed on negative indices.

antiagainst accepted this revision.May 3 2023, 10:41 AM
This revision is now accepted and ready to land.May 3 2023, 10:41 AM
This revision was automatically updated to reflect the committed changes.