diff --git a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp --- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp +++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp @@ -3698,10 +3698,8 @@ } } - if (KnownSPMDCount && KnownNonSPMDCount) - return indicatePessimisticFixpoint(); - - if (AssumedSPMDCount && AssumedNonSPMDCount) + if ((AssumedSPMDCount + KnownSPMDCount) && + (AssumedNonSPMDCount + KnownNonSPMDCount)) return indicatePessimisticFixpoint(); auto &Ctx = getAnchorValue().getContext();