projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d637fa
)
[NFC][SCEV] Cleanup lowering of @llvm.uadd.sat, (-1 - V) is just ~V
author
Roman Lebedev
<lebedev.ri@gmail.com>
Mon, 21 Sep 2020 19:09:59 +0000
(22:09 +0300)
committer
Roman Lebedev
<lebedev.ri@gmail.com>
Mon, 21 Sep 2020 19:10:59 +0000
(22:10 +0300)
llvm/lib/Analysis/ScalarEvolution.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Analysis/ScalarEvolution.cpp
b/llvm/lib/Analysis/ScalarEvolution.cpp
index
b82132d
..
4666419
100644
(file)
--- a/
llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/
llvm/lib/Analysis/ScalarEvolution.cpp
@@
-6368,11
+6368,7
@@
const SCEV *ScalarEvolution::createSCEV(Value *V) {
case Intrinsic::uadd_sat: {
const SCEV *X = getSCEV(II->getArgOperand(0));
const SCEV *Y = getSCEV(II->getArgOperand(1));
- const SCEV *ClampedX = getUMinExpr(
- X, getMinusSCEV(
- getConstant(cast<ConstantInt>(
- Constant::getAllOnesValue(II->getType()))),
- Y, (SCEV::NoWrapFlags)(SCEV::FlagNSW | SCEV::FlagNUW)));
+ const SCEV *ClampedX = getUMinExpr(X, getNotSCEV(Y));
return getAddExpr(ClampedX, Y, SCEV::FlagNUW);
}
default: