File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -7651,8 +7651,9 @@ static bool isGuaranteedNotToBeUndefOrPoison(
76517651 return true ;
76527652 }
76537653
7654- if (const auto *PN = dyn_cast<PHINode>(V)) {
7655- if (!includesPoison (Kind) || !PN->hasPoisonGeneratingFlags ()) {
7654+ if (!::canCreateUndefOrPoison (Opr, Kind,
7655+ /* ConsiderFlagsAndMetadata=*/ true )) {
7656+ if (const auto *PN = dyn_cast<PHINode>(V)) {
76567657 unsigned Num = PN->getNumIncomingValues ();
76577658 bool IsWellDefined = true ;
76587659 for (unsigned i = 0 ; i < Num; ++i) {
@@ -7667,11 +7668,9 @@ static bool isGuaranteedNotToBeUndefOrPoison(
76677668 }
76687669 if (IsWellDefined)
76697670 return true ;
7670- }
7671- } else if (!::canCreateUndefOrPoison (Opr, Kind,
7672- /* ConsiderFlagsAndMetadata=*/ true ) &&
7673- all_of (Opr->operands (), OpCheck))
7674- return true ;
7671+ } else if (all_of (Opr->operands (), OpCheck))
7672+ return true ;
7673+ }
76757674 }
76767675
76777676 if (auto *I = dyn_cast<LoadInst>(V))
You can’t perform that action at this time.
0 commit comments