[PATCH] D62447: [LVI][CVP] Add support for saturating add/sub
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 25 03:30:15 PDT 2019
lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.
Still not any more familiar with CVP, but this looks rather identical to the `solveBlockValueOverflowIntrinsic()` change, so LG.
Up to you if you want to wait for one more signoff (@spatel ?)
================
Comment at: llvm/lib/Analysis/LazyValueInfo.cpp:1122
+ ValueLatticeElement &BBLV, IntrinsicInst *II, BasicBlock *BB) {
+ switch (II->getIntrinsicID()) {
+ case Intrinsic::uadd_sat:
----------------
Have you considered adding a `SaturatingInst` base class, much like `WithOverflowInst`;
and/or `saturatingBinaryOp`, much like `binaryOp`, to `ConstantRange`?
I think that might potentially be a bit cleaner overall.
(Not for this patch)
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62447/new/
https://reviews.llvm.org/D62447
More information about the llvm-commits
mailing list