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)
commit7fa4e0fea680bde6f19e770cc57fc98453226aea
tree34076ed7627cfa620aa601b2872c71a376ef4314
parent8d27075c3d53368c14f0dd06b387529379de742d
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.

llvm-svn: 157092
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/2012-05-18-LoopPredRecurse.ll [new file with mode: 0644]