diff options
author | Jun Bum Lim <junbuml@codeaurora.org> | 2016-08-22 18:21:56 +0000 |
---|---|---|
committer | Jun Bum Lim <junbuml@codeaurora.org> | 2016-08-22 18:21:56 +0000 |
commit | ec8b8cc5954ac0c7c0ce0a4074cf87488431b980 (patch) | |
tree | bb04a4cfab65aca787b542a92962881e739fbb4e /llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | |
parent | 475f4a763f9a051f5769099dcf49ac858d4c6272 (diff) | |
download | bcm5719-llvm-ec8b8cc5954ac0c7c0ce0a4074cf87488431b980.tar.gz bcm5719-llvm-ec8b8cc5954ac0c7c0ce0a4074cf87488431b980.zip |
[InstCombine] Allow sinking from unique predecessor with multiple edges
Summary: We can allow sinking if the single user block has only one unique predecessor, regardless of the number of edges. Note that a switch statement with multiple cases can have the same destination.
Reviewers: mcrosier, majnemer, spatel, reames
Subscribers: reames, mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D23722
llvm-svn: 279448
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index 6424e083bd1..12c42ce6472 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -2903,7 +2903,7 @@ bool InstCombiner::run() { // If the user is one of our immediate successors, and if that successor // only has us as a predecessors (we'd have to split the critical edge // otherwise), we can keep going. - if (UserIsSuccessor && UserParent->getSinglePredecessor()) { + if (UserIsSuccessor && UserParent->getUniquePredecessor()) { // Okay, the CFG is simple enough, try to sink this instruction. if (TryToSinkInstruction(I, UserParent)) { DEBUG(dbgs() << "IC: Sink: " << *I << '\n'); |