[PATCH] D48283: [SCEV] Properly solve quadratic equations
Krzysztof Parzyszek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 1 10:24:46 PDT 2018
kparzysz marked 4 inline comments as done.
kparzysz added inline comments.
================
Comment at: include/llvm/ADT/APInt.h:2178
+/// same time "allowing" subtraction. In unsigned modulo arithmetic a
+/// subtraction would always count as an overflow, but here we want to
+/// allow values to decrease and increase as long as they are within
----------------
sanjoy wrote:
> I'm not sure this is correct -- `sub 5, 1` does not unsign-overflow right? (since zext(5) - zext(1) == zext(5 - 1))?
That's true, but then `sub 5, 1` is not the same as `add 5, -1`. I'm treating `sub x, y` as equivalent to `add x, -y`. I added a comment explaining this.
Repository:
rL LLVM
https://reviews.llvm.org/D48283
More information about the llvm-commits
mailing list