Fix a bug where RecursivelyDeleteTriviallyDeadInstructions could
authorChris Lattner <sabre@nondot.org>
Sat, 9 Apr 2011 07:05:44 +0000 (07:05 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 9 Apr 2011 07:05:44 +0000 (07:05 +0000)
commit0403b473dd99b5c7db1fa7048288be6cb42e7abd
tree59a2903ef8c22712780d39dcdbfba04e4b27a4a5
parentc3e4e59d1017178fdff33d6e34635f498c98592f
Fix a bug where RecursivelyDeleteTriviallyDeadInstructions could
delete the instruction pointed to by CGP's current instruction
iterator, leading to a crash on the testcase.  This fixes PR9578.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129200 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/CodeGenPrepare.cpp
test/CodeGen/Generic/crash.ll