<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><div><div class="AppleOriginalContents"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div></div><div><br></div><div><br></div><div><div style="margin: 0px 0px 0px 19px; font-size: 12px; ">[PATCH 2/2] Allow blocks to be merged when one has an undef input to a phi.</div></div><div><br>TryToSimplifyUncondBranchFromEmptyBlock was checking that any common<br>predecessors of the two blocks it is attempting to merge supply the<br>same incoming values to any phi in the successor block. This change<br>allows merging in the case where there is one or more incoming values<br>that are undef. The undef values are rewritten to match the non-undef<br>value that flows from the other edge.<br><br>Merged the tests from<br> - test/Transforms/SimplifyCFG/2008-05-16-PHIBlockMerge.ll<br>into<br> - test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll<br>and also added tests to this file for the situation addressed by this<br>patch.<br><br><<a href="rdar://problem/12801861">rdar://problem/12801861</a>><br>---<br>lib/Transforms/Utils/Local.cpp | 124 ++++++++++-<br>.../SimplifyCFG/2008-05-16-PHIBlockMerge.ll | 131 -----------<br>.../SimplifyCFG/EqualPHIEdgeBlockMerge.ll | 240 ++++++++++++++++++++-<br>3 files changed, 355 insertions(+), 140 deletions(-)<br>delete mode 100644 test/Transforms/SimplifyCFG/2008-05-16-PHIBlockMerge.ll<br><br></div></div><br></blockquote></div></div></body></html>