[SLP] make checks for cmp+select min/max more explicit
authorSanjay Patel <spatel@rotateright.com>
Fri, 9 Jul 2021 15:56:26 +0000 (11:56 -0400)
committerSanjay Patel <spatel@rotateright.com>
Fri, 9 Jul 2021 16:43:43 +0000 (12:43 -0400)
commit544f2711bb0b80b1c9126a33fb60fe9bb31ea420
treeac1121887d57204fa6e008cf65acbba263532c81
parente4f66a10556c82e2ebf2469fafc1c26639f15be8
[SLP] make checks for cmp+select min/max more explicit

This is NFC-intended currently (so no test diffs). The motivation
is to eventually allow matching for poison-safe logical-and and
logical-or (these are in the form of a select-of-bools).
( https://llvm.org/PR41312 )

Those patterns will not have all of the same constraints as min/max
in the form of cmp+sel. We may also end up removing the cmp+sel
min/max matching entirely (if we canonicalize to intrinsics), so
this will make that step easier.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp