aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorRuhung <143302514+Ruhung@users.noreply.github.com>2025-01-20 23:32:35 +0800
committerGitHub <noreply@github.com>2025-01-20 16:32:35 +0100
commit9c7e02d579db7ba81a414cd2212ce2b48b927941 (patch)
tree1ee6fab9c938c18107e83254e70a5b33c5d57ec5 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent8552c490462eb4180733d1f80d7b381e1518e29f (diff)
downloadllvm-9c7e02d579db7ba81a414cd2212ce2b48b927941.zip
llvm-9c7e02d579db7ba81a414cd2212ce2b48b927941.tar.gz
llvm-9c7e02d579db7ba81a414cd2212ce2b48b927941.tar.bz2
[InstCombine] Fold umax(nuw_mul(x, C0), x + 1) into (x == 0 ? 1 : nuw_mul(x, C0)) (#123468)
This PR introduces the following transformations: - If C0 is not 0: umax(nuw_shl(x, C0), x + 1) -> x == 0 ? 1 : nuw_shl(x, C0) - If C0 is not 0 or 1: umax(nuw_mul(x, C0), x + 1) -> x == 0 ? 1 : nuw_mul(x, C0) Fixes #122388. Alive2 proof: https://alive2.llvm.org/ce/z/rkp_8U
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions