[DependenceAnalysis] Fix for PR21585: collectUpperBound triggers asserts
authorJames Molloy <james.molloy@arm.com>
Fri, 15 May 2015 12:17:22 +0000 (12:17 +0000)
committerJames Molloy <james.molloy@arm.com>
Fri, 15 May 2015 12:17:22 +0000 (12:17 +0000)
commit39a7d6e91d51a9f5e5d24e007cb4d9fe92114cb3
tree5cf29a4a3ac62668e27356c7905a934faf393cc8
parent039eb5a7b85543d4f6e09e7f377124309245108e
[DependenceAnalysis] Fix for PR21585: collectUpperBound triggers asserts

collectUpperBound hits an assertion when the back edge count is wider then the desired type.

If that happens, truncate the backedge count.

Patch by Philip Pfaffe!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237439 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/DependenceAnalysis.cpp
test/Analysis/DependenceAnalysis/PR21585.ll [new file with mode: 0644]