Fixes #62382: https://github.com/llvm/llvm-project/issues/62382
This optimization applies under the precondition, that B is not equal to the minimum
value for the bitwidth of B, e.g. -128 for i8.
Alive2: https://alive2.llvm.org/ce/z/WIiHur
Baseline tests: https://reviews.llvm.org/D159204
This comment should include 'if B != INT_MIN'.