Fix overconfident assert in ScalarEvolution::isImpliedViaMerge
authorRoman Shirokiy <shirokiyroman@yandex.ru>
Fri, 29 Jun 2018 11:46:30 +0000 (11:46 +0000)
committerRoman Shirokiy <shirokiyroman@yandex.ru>
Fri, 29 Jun 2018 11:46:30 +0000 (11:46 +0000)
commit272eac85c7886708becec8510c1c350ab3024704
tree0ff85ddb7153d0128ecdfff9f81cf8f8e20eeb83
parent9bd44390b4e35a60789b5e10a64d8f38b908f181
Fix overconfident assert in ScalarEvolution::isImpliedViaMerge
We can have AddRec with loops having many predecessors.
This changes an assert to an early return.

Differential Revision: https://reviews.llvm.org/D48766

llvm-svn: 335965
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/merge-add-rec-many-inputs.ll [new file with mode: 0644]