[InstCombine] Remove foldAndOrOfEqualityCmpsWithConstants() fold
authorNikita Popov <npopov@redhat.com>
Fri, 29 Apr 2022 10:15:03 +0000 (12:15 +0200)
committerNikita Popov <npopov@redhat.com>
Fri, 29 Apr 2022 10:23:00 +0000 (12:23 +0200)
commit1f53932a95f16f53980af40d092901ff3480e00c
tree6157fc543876bec1af97b5ad5648cfbe62952c30
parente7e3829b6703633d0cb3f476dee6c02a3698216d
[InstCombine] Remove foldAndOrOfEqualityCmpsWithConstants() fold

This fold handles a special subset of foldAndOrOfICmpsUsingRanges(),
use the more generic implementation instead.

The result can differ if a representation using a range comparison
is possible, in which case that is preferred over masking. There is
a canonicalization opportunity here.
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/and-or-icmps.ll