[PATCH] D62703: [CVP] Simplify non-overflowing saturating add/sub
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 09:08:27 PDT 2019
nikic marked an inline comment as done.
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:414-431
static void processOverflowIntrinsic(WithOverflowInst *WO) {
IRBuilder<> B(WO);
Value *NewOp = B.CreateBinOp(
WO->getBinaryOp(), WO->getLHS(), WO->getRHS(), WO->getName());
// Constant-holing could have happened.
if (auto *Inst = dyn_cast<Instruction>(NewOp)) {
if (WO->isSigned())
----------------
lebedev.ri wrote:
> Hm, is this not preserving debugloc?
This does preserve debugloc. In this case it's handled by the IRBuilder API. (The overflows.ll test also does a debugify check.)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62703/new/
https://reviews.llvm.org/D62703
More information about the llvm-commits
mailing list