OSDN Git Service

[CloneFunction] Support BB == PredBB in DuplicateInstructionsInSplit.
authorFlorian Hahn <florian.hahn@arm.com>
Tue, 6 Mar 2018 13:12:32 +0000 (13:12 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Tue, 6 Mar 2018 13:12:32 +0000 (13:12 +0000)
commit6fdde843d6463d3fbe6f781489e088622addab25
tree13a31daa9daf13538c5728b8427fc4960f50b77a
parentd45c0f1adf57831f068af99ef92570a15672f1ea
[CloneFunction] Support BB == PredBB in DuplicateInstructionsInSplit.

In case PredBB == BB and StopAt == BB's terminator, StopAt != &*BI will
fail, because BB's terminator instruction gets replaced.

By using BB.getTerminator() we get the current terminator which we can use
to compare.

Reviewers: sanjoy, anna, reames

Reviewed By: anna

Differential Revision: https://reviews.llvm.org/D43822

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326779 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/CloneFunction.cpp
unittests/Transforms/Utils/Cloning.cpp