mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Reject a case we don't handle yet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23393 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7e1ff8d2d9
commit
9c88d98162
@ -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