aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaModule.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2023-01-14 11:18:47 -0800
committerCraig Topper <craig.topper@sifive.com>2023-01-14 11:18:47 -0800
commitff39b7ea89476c78177aff5cb0ddb441e74c8838 (patch)
tree186ec8a27b4d0fe8542b7db9811599e61747fb02 /clang/lib/Sema/SemaModule.cpp
parenta1580d7b59b65b17f2ce7fdb95f46379e7df4089 (diff)
downloadllvm-ff39b7ea89476c78177aff5cb0ddb441e74c8838.zip
llvm-ff39b7ea89476c78177aff5cb0ddb441e74c8838.tar.gz
llvm-ff39b7ea89476c78177aff5cb0ddb441e74c8838.tar.bz2
[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
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
0 files changed, 0 insertions, 0 deletions