Indvars: Don't recursively delete instruction during BB iteration.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 19 Oct 2012 17:53:54 +0000 (17:53 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 19 Oct 2012 17:53:54 +0000 (17:53 +0000)
commitf1088a37cb852909464b452b16599431c534ac69
treedd993f03391d0f275fb3c4b83b86e9d34a835e47
parentbc4a4565de8221ffc1856619590c23518b61f521
Indvars: Don't recursively delete instruction during BB iteration.

This can invalidate the iterators leading to use after frees and crashes.
Fixes PR12536.

llvm-svn: 166291
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
llvm/test/Transforms/IndVarSimplify/crash.ll