[InstCombine] add one-use check for min/max fold with not operands; NFC
authorSanjay Patel <spatel@rotateright.com>
Wed, 18 Aug 2021 21:02:55 +0000 (17:02 -0400)
committerSanjay Patel <spatel@rotateright.com>
Thu, 19 Aug 2021 12:41:38 +0000 (08:41 -0400)
commite10c3beca5590fc7df099ab7c173a9a4a21de9d1
tree1ef6f289593e1dca61f02deda799995855878dce
parent77579b99e9ce1638ca696fa7c3872ae8668d997d
[InstCombine] add one-use check for min/max fold with not operands; NFC

This makes the intrinsic logic match the cmp+select idiom folds
just below. It's not clearly a win either way unless we think
that a 'not' op costs more than min/max.

The cmp+select folds on these patterns are more extensive than
the intrinsics currently and may have some complicated interactions,
so I'm trying to make those line up and bring the optimizations
for intrinsics up to parity.
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/minmax-intrinsics.ll