Make use of getUMinFromMismatchedTypes when computing backedge-taken
authorDan Gohman <gohman@apple.com>
Mon, 22 Jun 2009 15:09:28 +0000 (15:09 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 22 Jun 2009 15:09:28 +0000 (15:09 +0000)
commit60e9b0708a8ce3a7b7eaee9bdceebb2c712514e1
tree5e8db76ecc1d9dbc8e07dd87a2d18b7c7dc528d9
parentc9759e80f45e5690c3ed3b69c2e9ffd5a1bffd9c
Make use of getUMinFromMismatchedTypes when computing backedge-taken
counts for loops with multiple exits, replacing more conservative code
which only handled constants. This is derived from a patch by
Nick Lewycky.

This also fixes llc aborts in ClamAV and others, as
getUMinFromMismatchedTypes takes care of balancing the types before
working with them.

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