File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
llvm/lib/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -4992,8 +4992,12 @@ InstCombinerImpl::pushFreezeToPreventPoisonFromPropagating(FreezeInst &OrigFI) {
4992
4992
return false ;
4993
4993
}
4994
4994
4995
- if (DT.dominates (BB, InBB) || isBackEdge (InBB, BB) ||
4996
- VisitedBBs.contains (InBB) || match (U.get (), m_Undef ()))
4995
+ // If there's multiple incoming edges from the same predecessor we must
4996
+ // ensure the freeze isn't pushed to a single one of the uses,
4997
+ // invalidating the iterator. We simply don't support this case, but it
4998
+ // could be handled if there's a use case.
4999
+ if (isBackEdge (InBB, BB) || !VisitedBBs.insert (InBB).second ||
5000
+ match (U.get (), m_Undef ()))
4997
5001
return false ;
4998
5002
VisitedBBs.insert (InBB);
4999
5003
}
You can’t perform that action at this time.
0 commit comments