[PATCH] D60668: [IR] Add WithOverflowInst class
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 16 10:18:06 PDT 2019
lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.
Ok, took me a couple passes, but i think *these* changes are good.
Don't know if there is more code to cleanup though.
Thanks.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:4584
+ bool Signed = WO->isSigned();
+ // TODO: Should add nuw/nsw flags for mul as well.
+ if (BinOp == Instruction::Mul || !isOverflowIntrinsicNoWrap(WO, DT))
----------------
If you don't intend to look into that, could you please file a bug, if there isn't one already?
================
Comment at: llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:403
+static bool willNotOverflow(WithOverflowInst *WO, LazyValueInfo *LVI) {
+ // TODO: Also support multiplication.
+ Instruction::BinaryOps BinOp = WO->getBinaryOp();
----------------
Similarly, if there is no bug yet, could you please create one?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60668/new/
https://reviews.llvm.org/D60668
More information about the llvm-commits
mailing list