[PATCH] D32143: [InstSimplify] use ConstantRange to simplify more and-of-icmps
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 18 12:35:35 PDT 2017
spatel added a comment.
In https://reviews.llvm.org/D32143#729550, @sanjoy wrote:
> In that case, (Lower = 18, Upper = 17) is one of the right answer(s). (Lower = 18, Upper = 13) would be wrong because, e.g., 15 is both in A and in B, but not in (Lower = 18, Upper = 13), and the contract is that "The resultant range is guaranteed to include all elements contained in both input ranges".
Ah, I get it now. Thanks for the explanation. In that case "contains" seems like my only option for this patch, and it is working as I expected.
https://reviews.llvm.org/D32143
More information about the llvm-commits
mailing list