aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorXChy <xxs_chy@outlook.com>2024-04-10 14:19:44 +0800
committerGitHub <noreply@github.com>2024-04-10 14:19:44 +0800
commit313a33b9dff44dc2b0048484e54f9328d9a0d9db (patch)
tree46110883dee53e80e77604ac2beca6635ae9b6bb /clang/lib/CodeGen/CGExprAgg.cpp
parent3d985a6f1bfcdb6e6d550003f9a1276fe47f588d (diff)
downloadllvm-313a33b9dff44dc2b0048484e54f9328d9a0d9db.zip
llvm-313a33b9dff44dc2b0048484e54f9328d9a0d9db.tar.gz
llvm-313a33b9dff44dc2b0048484e54f9328d9a0d9db.tar.bz2
[InstCombine] Reduce nested logical operator if poison is implied (#86823)
Fixes #76623 Alive2 proof: https://alive2.llvm.org/ce/z/gX6znJ (I'm not sure how to write a proof for such transform, maybe there are mistakes) In most cases, `icmp(a, C1) && (other_cond && icmp(a, C2))` will be reduced to `icmp(a, C1) & (other_cond && icmp(a, C2))`, since latter icmp always implies the poison of the former. After reduction, it's easier to simplify the icmp chain. Similarly, this patch does the same thing for `(A && B) && C --> A && (B & C)`. Maybe we could constraint such reduction only on icmps if there is regression in benchmarks.
Diffstat (limited to 'clang/lib/CodeGen/CGExprAgg.cpp')
0 files changed, 0 insertions, 0 deletions