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,
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- 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;
23792376 }
23802377
23812378 if (BasicBlock *BB = NumberingBB[Num]) {
You can’t perform that action at this time.
0 commit comments