mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 17:28:21 +00:00
Fix a debug info dependency in jump threading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67064 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
89a66a96fe
commit
6b23339502
@ -432,10 +432,13 @@ bool JumpThreading::ProcessSwitchOnDuplicateCond(BasicBlock *PredBB,
|
||||
|
||||
// If DESTBB *just* contains the switch, then we can forward edges from PREDBB
|
||||
// directly to their destination. This does not introduce *any* code size
|
||||
// growth.
|
||||
// growth. Skip debug info first.
|
||||
BasicBlock::iterator BBI = DestBB->begin();
|
||||
while (isa<DbgInfoIntrinsic>(BBI))
|
||||
BBI++;
|
||||
|
||||
// FIXME: Thread if it just contains a PHI.
|
||||
if (isa<SwitchInst>(DestBB->begin())) {
|
||||
if (isa<SwitchInst>(BBI)) {
|
||||
bool MadeChange = false;
|
||||
// Ignore the default edge for now.
|
||||
for (unsigned i = 1, e = DestSI->getNumSuccessors(); i != e; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user