[llvm-branch-commits] [llvm] [SCEV] Derive x >=s 0 from x <u y and y <=u 2^(n-1) (PR #231631)
Max Kazantsev via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Oct 21 17:57:47 PDT 2026
https://github.com/xortator requested changes to this pull request.
You've mixed up two completely unrelated parts of this improvement here in a way in a way that I cannot make any sense of. Please remember that the developer policy suggests to decompose unrelated changes into different patches or different MR. I suggest you to split your work the following way:
Part 1: swap predicate to match SignFlip pattern. Must consist of:
1. Adding tests confirming your claim that it helps to fire more existing checks when you canonicalize properly.
2. NFC patch that factors out the sign-flip part into a separate function (like `proveViaSignFlippedPredicate`) since you're going to reuse it.
3. Calling this function twice with direct and swapped predicate to see if any of these works. Should show improvements on these tests, no "temporarily disabled" features.
Compared to what you have now, no existing data corrupted, no extra "swapped" flags that we need to think about in the future added.
Part 2: add this new piece of
1. Adding tests that show that you need this new `SINT_MIN` logic part.
2. Add your new logic inside of `proveViaSignFlippedPredicate`, should show improvement on these tests.
Note: these two parts are unrelated. You can do part 2 before part 1, just need to construct a test where swapping `Pred` is not required, but still need to prove `-1 <s x` from `x <u y <=u SINT_MIN`. You can even go with this part first.
Feel free to make one MR with two distinct patches or split them into two MRs, but the current version is mixed up in a way how it shouldn't be.
https://github.com/llvm/llvm-project/pull/231631
More information about the llvm-branch-commits
mailing list