diff options
author | Nikita Popov <npopov@redhat.com> | 2023-02-20 15:55:17 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2023-04-14 11:32:58 +0200 |
commit | a75974516903a91897b042d065c968ba96d745d7 (patch) | |
tree | 6051bc94c1b714d9b67b52bb4c910143bee8a987 /llvm/lib/CodeGen/CodeGen.cpp | |
parent | 0b88adacd6967d9ce47cc863e36ad1f02db6fbc9 (diff) | |
download | llvm-a75974516903a91897b042d065c968ba96d745d7.zip llvm-a75974516903a91897b042d065c968ba96d745d7.tar.gz llvm-a75974516903a91897b042d065c968ba96d745d7.tar.bz2 |
[InstCombine] Support multiple comparisons in foldAllocaCmp()
foldAllocaCmp() needs to fold all comparisons of an alloca at the
same time, to ensure that there is a consistent view of the alloca
address. Currently, it folds "all" comparisons by limiting to the
case where there is only one. This patch switches the algorithm to
instead actually collect and fold all comparisons.
Something we need to be careful about here is that there may be
comparisons where both sides of the icmp are based on the alloca.
Such comparisons are comparing offsets of the alloca, and as such
can be ignored here, but shouldn't be folded to false.
Differential Revision: https://reviews.llvm.org/D144492
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions