Fix PR3784: If the source of a phi comes from a bb ended with an invoke, make sure...
authorEvan Cheng <evan.cheng@apple.com>
Fri, 13 Mar 2009 22:59:14 +0000 (22:59 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 13 Mar 2009 22:59:14 +0000 (22:59 +0000)
commitfc0b80d9746e5fd4b45057ab814c67371fb0f9ea
tree4e1792d9877bf7d0f8cb6090004afe0f8cfc31df
parent557f7f88ba686886278f83159b7a629c24a47176
Fix PR3784: If the source of a phi comes from a bb ended with an invoke, make sure the copy is inserted before the try range (unless it's used as an input to the invoke, then insert it after the last use), not at the end of the bb.

Also re-apply r66140 which was disabled as a workaround.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66976 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/PHIElimination.cpp
lib/Transforms/Scalar/CodeGenPrepare.cpp
test/CodeGen/X86/2009-03-13-PHIElimBug.ll [new file with mode: 0644]
test/CodeGen/X86/split-eh-lpad-edges.ll