SCEV: Handle a corner case reducing AddRecExpr * AddRecExpr
authorAndrew Trick <atrick@apple.com>
Wed, 30 May 2012 03:35:20 +0000 (03:35 +0000)
committerAndrew Trick <atrick@apple.com>
Wed, 30 May 2012 03:35:20 +0000 (03:35 +0000)
commitfe3516f9a5f238ecf6872b5315706c7c7942a496
tree5a671bdb757ae2a22b56e0a563c2b21a8bab94e8
parent97178aedb5f337ad9a6ac86fa052e777c7ad50d0
SCEV: Handle a corner case reducing AddRecExpr * AddRecExpr

If integer overflow causes one of the terms to reach zero, that can
force the entire expression to zero.

Fixes PR12929: cast<Ty>() argument of incompatible type

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157673 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/2012-05-29-MulAddRec.ll [new file with mode: 0644]