OSDN Git Service

[SCEV] Missing depth propagation in recursive call
authorMax Kazantsev <max.kazantsev@azul.com>
Fri, 29 Dec 2017 08:44:32 +0000 (08:44 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Fri, 29 Dec 2017 08:44:32 +0000 (08:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321550 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index f34549a..14bfe0d 100644 (file)
@@ -2358,7 +2358,7 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &Ops,
       FoundMatch = true;
     }
   if (FoundMatch)
-    return getAddExpr(Ops, Flags);
+    return getAddExpr(Ops, Flags, Depth + 1);
 
   // Check for truncates. If all the operands are truncated from the same
   // type, see if factoring out the truncate would permit the result to be