[PATCH] D39483: [CVP] Remove some {s|u}{add|sub}.with.overflow checks.
Joel Galenson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 8 09:52:17 PST 2017
jgalenson added a comment.
> If you think the previous name was better I'm ok with that.
I don't have a strong preference, so I'll keep yours.
> I'm not suggesting you change ConstantRange in this commit (that indeed is not a great idea). I'm suggesting that instead of adding a bunch of logic here only to move it to ConstantRange in a later commit, how about:
>
> - Commit0: Only process uadd and sadd in CVP with ConstantRange::makeGuaranteedNoWrapRegion.
> - Commit1: Teach makeGuaranteedNoWrapRegion about usub and ssub
> - Commit2: Use Commit1 to process ssub and usub in CVP
> - ...
>
> If anything, the sequence above will make the commits even more focussed. I hope I made sense.
Ah, sorry, I misunderstood you. Looks like we agree. :) I'll do that.
By the way, I would also like to get this code to handle non-constant arithmetic for cases such as:
if (x >= y)
.. x - y ...
But that's even harder, so I'll leave it for later.
https://reviews.llvm.org/D39483
More information about the llvm-commits
mailing list