Fix an issue with the MergeBasicBlockIntoOnlyPred() helper function where it did
authorOwen Anderson <resistor@mac.com>
Sat, 12 Jul 2014 07:12:47 +0000 (07:12 +0000)
committerOwen Anderson <resistor@mac.com>
Sat, 12 Jul 2014 07:12:47 +0000 (07:12 +0000)
commit452bd5f9c6869cb2c9ca3201302e508e9b61bf77
treea8b76b0d5e366df0fb58a858b55bda172f53a80f
parentb2d259060d121ba22db18797d230a10c6a95ef62
Fix an issue with the MergeBasicBlockIntoOnlyPred() helper function where it did
not properly handle the case where the predecessor block was the entry block to
the function.  The only in-tree client of this is JumpThreading, which worked
around the issue in its own code.  This patch moves the solution into the helper
so that JumpThreading (and other clients) do not have to replicate the same fix
everywhere.

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