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,
23672367 // See if we can refine the value number by looking at the PN incoming value
23682368 // for the given predecessor.
23692369 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+ }
23752378 return Num;
23762379 }
23772380
You can’t perform that action at this time.
0 commit comments