mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Reject a case we don't handle yet
llvm-svn: 23393
This commit is contained in:
parent
642f0d6aea
commit
4013184d6b
@ -897,7 +897,9 @@ HoistTerminator:
|
||||
static bool FoldCondBranchOnPHI(BranchInst *BI) {
|
||||
BasicBlock *BB = BI->getParent();
|
||||
PHINode *PN = dyn_cast<PHINode>(BI->getCondition());
|
||||
if (!PN || PN->getParent() != BB) return false;
|
||||
// NOTE: we currently cannot transform this case if the PHI node is used
|
||||
// outside of the block.
|
||||
if (!PN || PN->getParent() != BB || !PN->hasOneUse()) return false;
|
||||
|
||||
// Degenerate case of a single entry PHI.
|
||||
if (PN->getNumIncomingValues() == 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user