This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] Fold min/max based on dominating condition
ClosedPublic

Authored by nikic on Sep 4 2020, 2:50 PM.

Details

Summary

If we have a dominating condition that x >= y, then umax(x, y) is x, etc. I'm doing this in InstSimplify as the corresponding transform for the select form is also done there.

Diff Detail

Event Timeline

nikic created this revision.Sep 4 2020, 2:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 4 2020, 2:50 PM
nikic requested review of this revision.Sep 4 2020, 2:50 PM
spatel accepted this revision.Sep 5 2020, 6:08 AM

LGTM

This revision is now accepted and ready to land.Sep 5 2020, 6:08 AM