[PATCH] D67339: [ConstantRange] add helper function addWithNoWrap

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 9 13:46:51 PDT 2019


lebedev.ri added a comment.

In D67339#1663764 <https://reviews.llvm.org/D67339#1663764>, @nikic wrote:

> The implementation looks correct to me. As @lebedev.ri mentioned we usually add exhaustive tests for ConstantRange methods nowadays.




> I'm not totally sure what should be tested here... I guess we should test a) conservative correctness (no wrong results produced) and b) tight bounds if the input sets are non-wrapping/non-sign-wrapping.

That is what i was suggesting, yes; thought quick glance through code suggests that only a. can be enforced for the diff as present.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67339/new/

https://reviews.llvm.org/D67339





More information about the llvm-commits mailing list