Fix ScalarEvolution's "exhaustive" trip count evaluation code to avoid
authorDan Gohman <gohman@apple.com>
Sat, 19 Jun 2010 14:17:24 +0000 (14:17 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 19 Jun 2010 14:17:24 +0000 (14:17 +0000)
commitb92654d9c9cc34c75463e40d822fea4ac53950b3
treee114cde4045bf2a467f25093550d8e0a61138ef5
parent485c43fc478d5e16c55e14cb2586b56cc1c4c91f
Fix ScalarEvolution's "exhaustive" trip count evaluation code to avoid
assuming that loops are in canonical form, as ScalarEvolution doesn't
depend on LoopSimplify itself. Also, with indirectbr not all loops can
be simplified. This fixes PR7416.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106389 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/trip-count10.ll