[InstCombine] fold inc-of-signbit-splat to not+lshr
authorSanjay Patel <spatel@rotateright.com>
Mon, 29 Aug 2022 12:13:38 +0000 (08:13 -0400)
committerSanjay Patel <spatel@rotateright.com>
Mon, 29 Aug 2022 12:48:22 +0000 (08:48 -0400)
commit246078604c871d43394407db7f9f953494f45570
tree4409f88deb807e0655a39d5e8b877b310f8da045
parentac4c46d24bb9b12f289b8cc2c2be24800e4e71dd
[InstCombine] fold inc-of-signbit-splat to not+lshr

(iN X s>> (N - 1)) + 1 --> (~X) u>> (N - 1)

https://alive2.llvm.org/ce/z/wzS474
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/test/Transforms/InstCombine/add.ll
llvm/test/Transforms/InstCombine/high-bit-signmask.ll