This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Fold (min/max ~X, Y) -> ~(max/min X, ~Y) when Y is freely invertible
ClosedPublic

Authored by craig.topper on Sep 13 2018, 9:42 PM.

Details

Summary

This restores the combine that was reverted in r341883. The infinite loop from the failing test no longer occurs due to changes from r342163.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Sep 13 2018, 9:42 PM
spatel accepted this revision.Sep 17 2018, 11:22 AM

Given that this is the same patch as D51398 except with the potential inf-loop closed (we hope...), LGTM.

I'm not sure yet if there's any dependency between this and D52177, but we can answer that in the other review.

This revision is now accepted and ready to land.Sep 17 2018, 11:22 AM

@spatel, @dmgreen I’m away from a computer for a couple more days if one of you want to land this in the mean time

This revision was automatically updated to reflect the committed changes.