This is an archive of the discontinued LLVM Phabricator instance.

[mlir][arithmetic] Add tests for IndexCast folding ops and fix assert
ClosedPublic

Authored by ThomasRaoux on Oct 3 2022, 12:42 PM.

Details

Summary

Fix assert in IndexCastUI folding and add tests for both IndexCastOp and IndexCastUIOp folding

Diff Detail

Event Timeline

ThomasRaoux created this revision.Oct 3 2022, 12:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 3 2022, 12:42 PM
ThomasRaoux requested review of this revision.Oct 3 2022, 12:42 PM
mravishankar accepted this revision.Oct 3 2022, 1:22 PM
mravishankar added a subscriber: mravishankar.
mravishankar added inline comments.
mlir/test/Dialect/Arith/canonicalize.mlir
333

This is super confusing to read! Not an issue with this patch though. I guess its an issue with printer.... I would rather hope that printer prints in unsigned form by default.

This revision is now accepted and ready to land.Oct 3 2022, 1:22 PM
ThomasRaoux added inline comments.Oct 3 2022, 1:27 PM
mlir/test/Dialect/Arith/canonicalize.mlir
333

Yes this is quite confusing. This is the same in llvm if I recall. Not sure there is an easy solution since it really depends on the context.

This revision was landed with ongoing or failed builds.Oct 3 2022, 1:28 PM
This revision was automatically updated to reflect the committed changes.