diff options
| author | Nikita Popov <npopov@redhat.com> | 2024-05-03 11:09:00 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-03 11:09:00 +0900 |
| commit | b0eeacb20379f6d80079793b8461f56c240e6570 (patch) | |
| tree | 05a200637c554f98639ea027ad3114c64ca389a5 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | fc83eda46ed2e8d6e121cc9b3c04669651e23ad0 (diff) | |
[InstCombine] Fold icmp of trunc nuw/nsw (#90436)
Convert the existing foldICmpTruncWithTruncOrExt() fold to work with
trunc nowrap flags instead of computeKnownBits(). This also allows us to
generalize the fold to work with signed comparisons.
Interestingly, apart from the obvious combinations like signed
predicates with trunc nsw, some non-obvious ones are also legal. For
example for unsigned predicates we can do the transform for two trunc
nsw as well (rather than only trunc nuw).
Proofs: https://alive2.llvm.org/ce/z/ndewwK
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
