[PATCH] D62703: [CVP] Simplify non-overflowing saturating add/sub
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 14:55:37 PDT 2019
lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.
Looks good
================
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())
----------------
Hm, is this not preserving debugloc?
================
Comment at: llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:418
WO->getBinaryOp(), WO->getLHS(), WO->getRHS(), WO->getName());
// Constant-holing could have happened.
if (auto *Inst = dyn_cast<Instruction>(NewOp)) {
----------------
holding
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62703/new/
https://reviews.llvm.org/D62703
More information about the llvm-commits
mailing list