[InstCombine] Optimize (icmp slt (1 << Y), 1) -> (icmp eq Y, BitWidth-1).
The code tried to do this for (icmp sle (1 << Y), 0), but that is canonicalized to sgt before we get there. Simplify the code by removing the unreachable SGE and SLE handling. Also remove the (1 << Y) >=u 2147483648 and (1 << Y) <u 2147483648 handling since those are canonicalized to (1 << Y) <s 0 and (1 << Y) >=s 0 before we get there. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D141753
Loading
Please sign in to comment