[PATCH] D127188: [InstCombine] improve fold for icmp-ugt-ashr
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 12:17:10 PDT 2022
spatel added a comment.
For reference, this was the Alive2 from the original review ( D117365 <https://reviews.llvm.org/D117365> ):
https://alive2.llvm.org/ce/z/tFAcZt
To catch the overflow case, I think we check if the incremented + shifted constant became signed min (0x8000...):
https://alive2.llvm.org/ce/z/RZdftJ
So that should be simpler than the pre-condition currently shown in this patch.
(C + 1).shl(ShAmtVal).isMinSignedValue()
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127188/new/
https://reviews.llvm.org/D127188
More information about the llvm-commits
mailing list