File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
llvm/lib/Transforms/Scalar Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -2367,15 +2367,12 @@ uint32_t GVNPass::ValueTable::phiTranslateImpl(const BasicBlock *Pred,
2367
2367
// See if we can refine the value number by looking at the PN incoming value
2368
2368
// for the given predecessor.
2369
2369
if (PHINode *PN = NumberingPhi[Num]) {
2370
- if (PN->getParent () != PhiBlock)
2371
- return Num;
2372
-
2373
- for (unsigned I = 0 ; I != PN->getNumIncomingValues (); ++I) {
2374
- if (PN->getIncomingBlock (I) != Pred)
2375
- continue ;
2376
- if (uint32_t TransVal = lookup (PN->getIncomingValue (I), false ))
2377
- return TransVal;
2378
- }
2370
+ if (PN->getParent () == PhiBlock)
2371
+ for (unsigned I = 0 ; I != PN->getNumIncomingValues (); ++I)
2372
+ if (PN->getIncomingBlock (I) == Pred)
2373
+ if (uint32_t TransVal = lookup (PN->getIncomingValue (I), false ))
2374
+ return TransVal;
2375
+ return Num;
2379
2376
}
2380
2377
2381
2378
if (BasicBlock *BB = NumberingBB[Num]) {
You can’t perform that action at this time.
0 commit comments