[InstCombine] Add fold for redundant sign bits count comparison
For power-of-2 C: ((X s>> ShiftC) ^ X) u< C --> (X + C) u< (C << 1) ((X s>> ShiftC) ^ X) u> (C - 1) --> (X + C) u> ((C << 1) - 1) (https://github.com/llvm/llvm-project/issues/56479) Test plan: 0/ ninja check-llvm check-clang + bootstrap LLVM/Clang 1/ https://alive2.llvm.org/ce/z/eEUfx3 Differential revision: https://reviews.llvm.org/D130433
Loading
Please sign in to comment