[PATCH] D23723: [SLP] Avoid signed integer overflow

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 19 15:25:29 PDT 2016


mkuper added a comment.

Using SaturatingAdd here seems right, but:

a) I'd prefer it if the test did check something beyond "don't crash".
b) It would be better it if one of the language lawyers looked at the SaturatingAdd implementation. In particular, I'm not sure casting an out-of-range unsigned to signed is well-defined.


https://reviews.llvm.org/D23723





More information about the llvm-commits mailing list