[PATCH] D107552: [InstCombine] Combine lshr of add that intends to get the carry as llvm.uadd.with.overflow
Abinav Puthan Purayil via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 10 20:42:36 PDT 2021
abinavpp added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp:1060
+
+ // Be conservative if the newly created overflow would be a live-out of it's
+ // basic-block.
----------------
lebedev.ri wrote:
> I really don't think we should be doing this..
I think I'm being too cautious here. I just realized that InstCombinerImpl::foldICmpWithConstant() can produce sadd_with_overflow, if I read correctly it doesn't seem to worry about cross basic-block use. I have removed this check now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107552/new/
https://reviews.llvm.org/D107552
More information about the llvm-commits
mailing list