OSDN Git Service

[InstCombine] Allow sinking from unique predecessor with multiple edges
authorJun Bum Lim <junbuml@codeaurora.org>
Mon, 22 Aug 2016 18:21:56 +0000 (18:21 +0000)
committerJun Bum Lim <junbuml@codeaurora.org>
Mon, 22 Aug 2016 18:21:56 +0000 (18:21 +0000)
commit11ee15bafcbfc54c96c3f148437fe028c5cdf22a
tree3314b0d5f4851f1cca4f044c87fd31a800067f00
parentabcbb63bbfd5caf34fe58bbf0b42463c6bac5182
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279448 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/sink_instruction.ll