aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python
diff options
context:
space:
mode:
authorDhruv Chawla <44582521+dc03@users.noreply.github.com>2023-07-10 23:42:30 +0530
committerDhruv Chawla <44582521+dc03@users.noreply.github.com>2023-07-12 11:13:37 +0530
commit20ae2d200dc94b051757174ec0f3a03103b8e1e2 (patch)
tree9acf39defc93cc31f0166ae83067f869196fa097 /lldb/source/Plugins/ScriptInterpreter/Python
parentb336f9deeba2e1559d398a4fc2a00254c865953f (diff)
downloadllvm-20ae2d200dc94b051757174ec0f3a03103b8e1e2.zip
llvm-20ae2d200dc94b051757174ec0f3a03103b8e1e2.tar.gz
llvm-20ae2d200dc94b051757174ec0f3a03103b8e1e2.tar.bz2
[InstCombine] Generalize foldAndOrOfICmpEqZeroAndICmp
This patch generalizes the fold implemented by foldAndOrOfICmpEqZeroAndICmp, which are: (icmp eq X, 0) | (icmp ult Other, X) -> (icmp ule Other, X-1) (icmp ne X, 0) & (icmp uge Other, X) -> (icmp ugt Other, X-1) to the following: (icmp eq X, C) | (icmp ult Other, (X - C)) -> (icmp ule Other, (X - (C + 1))) (icmp ne X, C) & (icmp uge Other, (X - C)) -> (icmp ugt Other, (X - (C + 1))) The function foldAndOrOfICmpEqZeroAndICmp is also renamed to foldAndOrOfICmpEqConstantAndICmp to reflect the changes. Proofs: https://alive2.llvm.org/ce/z/yXGv6q Fixes #63749. Differential Revision: https://reviews.llvm.org/D154937
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions