File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
llvm/lib/Transforms/Scalar Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -2367,11 +2367,14 @@ 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
- 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;
2370
+ if (PN->getParent () != PhiBlock)
2371
+ return Num;
2372
+ for (unsigned I = 0 ; I != PN->getNumIncomingValues (); ++I) {
2373
+ if (PN->getIncomingBlock (I) != Pred)
2374
+ continue ;
2375
+ if (uint32_t TransVal = lookup (PN->getIncomingValue (I), false ))
2376
+ return TransVal;
2377
+ }
2375
2378
return Num;
2376
2379
}
2377
2380
You can’t perform that action at this time.
0 commit comments