aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
diff options
context:
space:
mode:
authorYingwei Zheng <dtcxzyw2333@gmail.com>2023-09-18 21:32:48 +0800
committerGitHub <noreply@github.com>2023-09-18 21:32:48 +0800
commitbe2723da5c5f2d7f7c3351813b749c0fcf631451 (patch)
treee69824e3348920493d6c2092eb8f34da23ea2414 /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
parentfb4bdf361feecfd0863c1553ec14ef9928027a24 (diff)
downloadllvm-be2723da5c5f2d7f7c3351813b749c0fcf631451.zip
llvm-be2723da5c5f2d7f7c3351813b749c0fcf631451.tar.gz
llvm-be2723da5c5f2d7f7c3351813b749c0fcf631451.tar.bz2
[InstSimplify] Fold icmp of `X and/or C1` and `X and/or C2` into constant (#65905)
This patch simplifies the pattern `icmp X and/or C1, X and/or C2` when one constant mask is the subset of the other. If `C1 & C2 == C1`, `A = X and/or C1`, `B = X and/or C2`, we can do the following folds: `icmp ule A, B -> true` `icmp ugt A, B -> false` We can apply similar folds for signed predicates when `C1` and `C2` are the same sign: `icmp sle A, B -> true` `icmp sgt A, B -> false` Alive2: https://alive2.llvm.org/ce/z/Q4ekP5 Fixes #65833.
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions