diff options
author | Tian Zhou <tianzhou93@gmail.com> | 2022-09-05 09:50:40 -0400 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2022-09-05 09:51:51 -0400 |
commit | 8fa432be4f749c4ab0ee452d8f7c4337d67861a1 (patch) | |
tree | e15aa15e6f0cb3f27c6354ded99409e566049a17 /llvm/lib/Object/COFFObjectFile.cpp | |
parent | 5db8d6fd2bd6db3cdc6290b538f054ca0833d763 (diff) | |
download | llvm-8fa432be4f749c4ab0ee452d8f7c4337d67861a1.zip llvm-8fa432be4f749c4ab0ee452d8f7c4337d67861a1.tar.gz llvm-8fa432be4f749c4ab0ee452d8f7c4337d67861a1.tar.bz2 |
[InstCombine] reduce test-for-overflow of shifted value
Fixes #57338.
The added code makes the following transformations:
For unsigned predicates / eq / ne:
icmp pred (x << 1), x --> icmp getSignedPredicate(pred) x, 0
icmp pred x, (x << 1) --> icmp getSignedPredicate(pred) 0, x
Some examples:
https://alive2.llvm.org/ce/z/ckn4cj
https://alive2.llvm.org/ce/z/h-4bAQ
Differential Revision: https://reviews.llvm.org/D132888
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions