diff options
author | Florian Hahn <flo@fhahn.com> | 2021-02-15 17:32:11 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2021-02-19 20:33:42 +0000 |
commit | ac5cc50e2598878abbeec0422ace51a020ba75c4 (patch) | |
tree | 4ad6b1a4460519cbdf1c59185f0cb6fac2eb6687 /llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | |
parent | c1653b8cc7bd8e7e3168089b6c6dad0aa4b6fdd6 (diff) | |
download | llvm-perf/tmp.tar.gz |
[SCEV] Improve handling of pointer compares involving subtractions.perf/tmp
This patch improves handling of pointer comparisons involving
subtractions, if an offset is known to be positive.
Proof for isKnownPredicateSubIdiom: https://alive2.llvm.org/ce/z/Gfe8mS
Proof for getUDivExpr extension:a https://alive2.llvm.org/ce/z/H_G2Q0
Diffstat (limited to 'llvm/lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index ae1fff0fa844..643605ff352c 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -1521,8 +1521,8 @@ bool IndVarSimplify::optimizeLoopExits(Loop *L, SCEVExpander &Rewriter) { // Can we prove that some other exit must be taken strictly before this // one? - if (SE->isLoopEntryGuardedByCond(L, CmpInst::ICMP_ULT, - MaxExitCount, ExitCount)) { + if (SE->isLoopEntryGuardedByCond(L, CmpInst::ICMP_ULT, MaxExitCount, + ExitCount)) { foldExit(L, ExitingBB, false, DeadInsts); Changed = true; continue; |