This is an archive of the discontinued LLVM Phabricator instance.

[mlir][arith] Canonicalize `addi(x, muli(y, -1))` -> `subi(x, y)`
ClosedPublic

Authored by kuhar on Mar 6 2023, 2:15 PM.

Details

Summary

These propagate all the way down to SPIR-V and result in some fishy code
with large constants.

Diff Detail

Event Timeline

kuhar created this revision.Mar 6 2023, 2:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2023, 2:15 PM
kuhar requested review of this revision.Mar 6 2023, 2:15 PM
antiagainst accepted this revision.Mar 6 2023, 2:48 PM

Thanks!

This revision is now accepted and ready to land.Mar 6 2023, 2:48 PM
This revision was landed with ongoing or failed builds.Mar 6 2023, 4:29 PM
This revision was automatically updated to reflect the committed changes.