This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Arith] Make integer max/min commutative.
ClosedPublic

Authored by jacquesguan on Mar 22 2022, 6:06 AM.

Details

Summary

Make MaxSI, MaxUI, MinSI and MinUI commutative, so they will be canonicalized to have its constants appear as the second operand. And the constant folder will match more cases.

Diff Detail

Event Timeline

jacquesguan created this revision.Mar 22 2022, 6:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 22 2022, 6:06 AM
jacquesguan requested review of this revision.Mar 22 2022, 6:06 AM

fix the test.

pifon2a accepted this revision.Mar 22 2022, 7:15 AM
This revision is now accepted and ready to land.Mar 22 2022, 7:15 AM
This revision was automatically updated to reflect the committed changes.