CodeGenPrepare: Move ret duplication out of the instruction iteration loop.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 23 Nov 2012 19:17:06 +0000 (19:17 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 23 Nov 2012 19:17:06 +0000 (19:17 +0000)
commit4ccb49a8384d25cfeb65453da059ed1a7a00b5ed
tree134fbd8b1af4075f3a0537f8cf1c15ac779c4ac0
parent5d1e089eaa4ab0080da4e5f61379bba596a4f2b5
CodeGenPrepare: Move ret duplication out of the instruction iteration loop.

It can delete the block, and the loop continues on free'd memory.
No change in output. Found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168525 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/CodeGenPrepare.cpp