[PATCH] D39954: [IRCE] Smart range intersection
Anna Thomas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 11:38:36 PST 2017
anna added a comment.
Max, the patch explanation and logic of using SCEV subtraction LGTM. I'll need to take a closer look at your rules and the calculation in subtraction lambda.
================
Comment at: lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp:1658
+ "We can only substract from values in [0; SINT_MAX]!");
+ if (IsLatchSigned) {
+ // X is a number from signed range, Y is interpreted as signed.
----------------
To clarify: In both cases - signed and unsigned latch, the SCEV subtraction and rules you have below will always give us a value in range [0, SINT_MAX], i.e. we will never cross the signed border.
Here we are just "strengthening" the range and using unambiguous values for range intersection later on IRCE.
https://reviews.llvm.org/D39954
More information about the llvm-commits
mailing list