[PATCH] D46046: [SCEV] Do not use induction in isKnownPredicate for simplification umax
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 9 18:44:37 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL331949: SCEV] Do not use induction in isKnownPredicate for simplification umax. (authored by skatkov, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D46046?vs=144980&id=146049#toc
Repository:
rL LLVM
https://reviews.llvm.org/D46046
Files:
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Index: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
===================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp
@@ -3517,12 +3517,13 @@
for (unsigned i = 0, e = Ops.size()-1; i != e; ++i)
// X umax Y umax Y --> X umax Y
// X umax Y --> X, if X is always greater than Y
- if (Ops[i] == Ops[i+1] ||
- isKnownPredicate(ICmpInst::ICMP_UGE, Ops[i], Ops[i+1])) {
- Ops.erase(Ops.begin()+i+1, Ops.begin()+i+2);
+ if (Ops[i] == Ops[i + 1] || isKnownViaNonRecursiveReasoning(
+ ICmpInst::ICMP_UGE, Ops[i], Ops[i + 1])) {
+ Ops.erase(Ops.begin() + i + 1, Ops.begin() + i + 2);
--i; --e;
- } else if (isKnownPredicate(ICmpInst::ICMP_ULE, Ops[i], Ops[i+1])) {
- Ops.erase(Ops.begin()+i, Ops.begin()+i+1);
+ } else if (isKnownViaNonRecursiveReasoning(ICmpInst::ICMP_ULE, Ops[i],
+ Ops[i + 1])) {
+ Ops.erase(Ops.begin() + i, Ops.begin() + i + 1);
--i; --e;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46046.146049.patch
Type: text/x-patch
Size: 1116 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180510/beb2b54a/attachment.bin>
More information about the llvm-commits
mailing list