Revert "[InstCombine] Add or((icmp ult/ule (A + C1), C3), (icmp ult/ule (A + C2)...
authorMartin Storsjö <martin@martin.st>
Wed, 21 Oct 2020 06:33:51 +0000 (09:33 +0300)
committerMartin Storsjö <martin@martin.st>
Wed, 21 Oct 2020 06:47:18 +0000 (09:47 +0300)
commit4de215ff187746ff02ffdc6bd56bb54d42cbfdca
treede42e5cbc33b9bcd5ca36fbbf378048f4f4f5beb
parent9fbb060418e00ed7ee3cc88fdd9b90d78b2623a5
Revert "[InstCombine] Add or((icmp ult/ule (A + C1), C3), (icmp ult/ule (A + C2), C3)) uniform vector support"

Also revert "[InstCombine] foldOrOfICmps - use m_Specific instead of
explicit comparisons. NFCI." to make the primarily intended revert
work.

This reverts commits ce13549761b6a22263e051dda09ef5122435008b and
e372a5f86f6488bb0c2593a665d51fdd3a97c6e4.

This commit caused failed asserts e.g. like this:

$ cat repro.cpp
bool a(char b) {
  return b >= '0' && b <= '9' || (b | 32) >= 'a' && (b | 32) <= 'z';
$ clang++ -target x86_64-linux-gnu -c -O2 repro.cpp
clang++: ../include/llvm/ADT/APInt.h:1151: bool llvm::APInt::operator==(const
llvm::APInt&) const: Assertion `BitWidth == RHS.BitWidth && "Comparison
requires equal bit widths"' failed.
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/or.ll