HomePhabricator

[EarlyCSE] recognize commuted and swapped variants of min/max as equivalent…

Authored by spatel on Dec 13 2017, 1:58 PM.

Description

[EarlyCSE] recognize commuted and swapped variants of min/max as equivalent (PR35642)

As shown in:
https://bugs.llvm.org/show_bug.cgi?id=35642
...we can have different forms of min/max, so we should recognize those here in EarlyCSE
similar to how we already handle binops and compares that can commute.

Differential Revision: https://reviews.llvm.org/D41136

llvm-svn: 320640