SCEV: Add MarkPendingLoopPredicates to avoid recursive isImpliedCond.
authorAndrew Trick <atrick@apple.com>
Sat, 19 May 2012 00:48:25 +0000 (00:48 +0000)
committerAndrew Trick <atrick@apple.com>
Sat, 19 May 2012 00:48:25 +0000 (00:48 +0000)
commit8aa22019ca5ef29a15058be905d782e7225aa206
tree8b4d0c98b890e76017e78904ec69c94f16457f96
parentce5d8b0d03b9c37727d08de4fa1bcc7be7ea8bb1
SCEV: Add MarkPendingLoopPredicates to avoid recursive isImpliedCond.

getUDivExpr attempts to simplify by checking for overflow.
isLoopEntryGuardedByCond then evaluates the loop predicate which
may lead to the same getUDivExpr causing endless recursion.

Fixes PR12868: clang 3.2 segmentation fault.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157092 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ScalarEvolution.h
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/2012-05-18-LoopPredRecurse.ll [new file with mode: 0644]