[PATCH] D62792: [SimplifyIndVar] Simplify non-overflowing saturating add/sub
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 00:36:46 PDT 2019
nikic marked an inline comment as done.
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:475-476
if (WO->use_empty())
WO->eraseFromParent();
----------------
lebedev.ri wrote:
> Hm, this is because we didn't deal with non-`ExtractValueInst` uses of `WO`?
> Since we know the overflow won't happen, those can be simply folded to a single insert, no?
That should be possible, and that's what we do in other places doing this optimization. I think that this code is going out of the way to replace the ExtractValues instead because SCEV cannot reason about aggregate operations.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62792/new/
https://reviews.llvm.org/D62792
More information about the llvm-commits
mailing list