fix PR8102, a case where we'd copyValue from a value that we already
authorChris Lattner <sabre@nondot.org>
Tue, 14 Sep 2010 00:19:00 +0000 (00:19 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 14 Sep 2010 00:19:00 +0000 (00:19 +0000)
commit7abdb22e52e2122cb04479a1129dc68916dece4c
treeca1e440a64d678b09c1a63a370ad9968d66d49fb
parent3a210e2d302758101ac06946e86027b327c7d0f3
fix PR8102, a case where we'd copyValue from a value that we already
deleted.  Fix this by doing the copyValue's before we delete stuff!

The testcase only repros the problem on my system with valgrind.

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