Fix SCEVExpander::visitAddRecExpr so that it remembers the induction variable
authorDan Gohman <gohman@apple.com>
Mon, 26 Jul 2010 18:28:14 +0000 (18:28 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 26 Jul 2010 18:28:14 +0000 (18:28 +0000)
commit6ebfd72f37325a1ebceb53e5ecad524d359d8d0b
tree93f49fad350bd0cd941bfd685dee06797b698264
parent7da5d3fc657bf434a245d11ad91f22feb86296c5
Fix SCEVExpander::visitAddRecExpr so that it remembers the induction variable
it inserted rather than using LoopInfo::getCanonicalInductionVariable to
rediscover it, since that doesn't work on non-canonical loops. This fixes
infinite recurrsion on such loops; PR7562.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109419 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolutionExpander.cpp
test/Transforms/IndVarSimplify/crash.ll