This is an archive of the discontinued LLVM Phabricator instance.

[mlir][arith] Canonicalization patterns for subi.
ClosedPublic

Authored by vzakhari on Sep 9 2022, 1:51 PM.

Details

Summary

subi(addi(a, b), b) -> a
subi(addi(a, b), a) -> b
subi(subi(a, b), a) -> subi(0, b)

Diff Detail

Event Timeline

vzakhari created this revision.Sep 9 2022, 1:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 9 2022, 1:51 PM
vzakhari requested review of this revision.Sep 9 2022, 1:51 PM

Thanks, looks good to me.

Thanks, looks good to me.

Thank you for the review, Jean! I will merge this in a couple of days to let other reviewers give their feedback.

ftynse accepted this revision.Sep 13 2022, 5:30 AM
This revision is now accepted and ready to land.Sep 13 2022, 5:30 AM
This revision was automatically updated to reflect the committed changes.