[Analysis] reduce code for matching min/max; NFC
authorSanjay Patel <spatel@rotateright.com>
Thu, 31 Dec 2020 21:45:33 +0000 (16:45 -0500)
committerSanjay Patel <spatel@rotateright.com>
Thu, 31 Dec 2020 22:19:37 +0000 (17:19 -0500)
commiteaab71106b81031d272acfc6987e99e8b65cbe6c
treee7ac1495703214c99cbe021181a0a0909b05f1a7
parentd1fd72343c6ff58a3b66bc0df56fed9ac21e4056
[Analysis] reduce code for matching min/max; NFC

This might also make it easier to adapt if we want
to match min/max intrinsics rather than cmp+sel idioms.

The 'const' part is to potentially avoid confusion
in calling code. There's some surprising and possibly
wrong behavior related to matching min/max reductions
differently than other reductions.
llvm/include/llvm/Analysis/IVDescriptors.h
llvm/lib/Analysis/IVDescriptors.cpp