fix two problems with machine sinking:
authorChris Lattner <sabre@nondot.org>
Fri, 10 Apr 2009 16:38:36 +0000 (16:38 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 10 Apr 2009 16:38:36 +0000 (16:38 +0000)
commit296185c264a47cadd52c8d3290a54837cc32cbe5
treebfd39852fe00a67b06c4b7945a1c68953a23b7aa
parent0355862f712ce23ebb82e9e9378e92ef3b34027b
fix two problems with machine sinking:
1. Sinking would crash when the first instruction of a block was
   sunk due to iterator problems.
2. Instructions could be sunk to their current block, causing an
   infinite loop.

This fixes PR3968

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68787 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineSink.cpp
test/CodeGen/Generic/2009-04-10-SinkCrash.ll [new file with mode: 0644]