diff options
author | Nikita Popov <npopov@redhat.com> | 2023-03-15 16:40:59 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2023-03-16 09:41:52 +0100 |
commit | 61d2f3a71e61929bf9b07c90e21d268090417bdb (patch) | |
tree | 79fdc875dd2e8837da4b23abcddf07c0ad4f2b92 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | ddbcd985602dcb5fe78fcf2246cf53922db1f3c3 (diff) | |
download | llvm-61d2f3a71e61929bf9b07c90e21d268090417bdb.zip llvm-61d2f3a71e61929bf9b07c90e21d268090417bdb.tar.gz llvm-61d2f3a71e61929bf9b07c90e21d268090417bdb.tar.bz2 |
[InstCombine] Canonicalize icmp eq pow2 more thoroughly
We currently already canonicalize icmp eq (%x & Pow2), Pow2 to
icmp ne (%x & Pow2), 0. This patch generalizes the fold based on
known bits.
In particular, this allows us to handle comparisons against
!range !{i64 0, i64 2} loads, which addresses an optimization
regression in Rust caused by 8df376db7282b955e7990cb8887ee9dcd3565040.
Differential Revision: https://reviews.llvm.org/D146149
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions