TryToSimplifyUncondBranchFromEmptyBlock was checking that any common
authorDuncan Sands <baldrick@free.fr>
Thu, 11 Jul 2013 08:28:20 +0000 (08:28 +0000)
committerDuncan Sands <baldrick@free.fr>
Thu, 11 Jul 2013 08:28:20 +0000 (08:28 +0000)
commitc48b55a33dc5cd898dc9e58c0a1650b8f24c3879
tree2446e2e853dd5d818d334985651792f571b4cadf
parent6cf88c985023bf76d6160a68bc75489465ac15b0
TryToSimplifyUncondBranchFromEmptyBlock was checking that any common
predecessors of the two blocks it is attempting to merge supply the
same incoming values to any phi in the successor block.  This change
allows merging in the case where there is one or more incoming values
that are undef.  The undef values are rewritten to match the non-undef
value that flows from the other edge.  Patch by Mark Lacey.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186069 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/Local.cpp
test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll