Move folding of icmp with zero after checking for min/max idioms.
The following transformation for cmp instruction:
icmp smin(x, PositiveValue), 0 -> icmp x, 0
should only be done after checking for min/max to prevent infinite
looping caused by a reverse canonicalization. That is why this
transformation was moved to place after the mentioned check.
Reviewers: spatel, efriedma
Differential Revision: https://reviews.llvm.org/D38934
Patch by: Artur Gainullin <email@example.com>