]> granicus.if.org Git - llvm/commit
Merging r195493:
authorBill Wendling <isanbard@gmail.com>
Mon, 25 Nov 2013 05:23:10 +0000 (05:23 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 25 Nov 2013 05:23:10 +0000 (05:23 +0000)
commite96466ecc0b2bdee0bed2156e12dc16f4adb2d50
treead1663cc50fdf5e901cd569ddb4dfc30de8f1b4a
parent215aad562cbff81f5b1ce5b570076b88a87998f8
Merging r195493:
------------------------------------------------------------------------
r195493 | arsenm | 2013-11-22 11:24:39 -0800 (Fri, 22 Nov 2013) | 6 lines

StructurizeCFG: Fix verification failure with some loops.

If the beginning of the loop was also the entry block
of the function, branches were inserted to the entry block
which isn't allowed. If this occurs, create a new dummy
function entry block that branches to the start of the loop.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195606 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/StructurizeCFG.cpp
test/Transforms/StructurizeCFG/no-branch-to-entry.ll [new file with mode: 0644]