llvm-project
58cffea9 - [InstCombine] Canonicalize signed saturated additions (#153053)

Commit
95 days ago
[InstCombine] Canonicalize signed saturated additions (#153053) https://alive2.llvm.org/ce/z/YGT5SN https://alive2.llvm.org/ce/z/PVDxCw https://alive2.llvm.org/ce/z/8buR2N This is tricky because with positive numbers, we only go up, so we can in fact always hit the signed_max boundary. This is important because the intrinsic we use has the behavior of going the OTHER way, aka clamp to INT_MIN if it goes in that direction. And the range checking we do only works for positive numbers. Because of this issue, we can only do this for constants as well.
Author
Parents
Loading