From 89d6157c2cea0434a5b2a887ef1de5539bbac135 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 23 Jul 2021 13:36:27 -0400 Subject: [PATCH] [AbstractAttributor] Refine logic to indicate pessimistic fixed point when folding `__kmpc_is_spmd_exec_mode` Since we are using assumed information now, the logic should be refined to avoid unncessary assertion. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D106630 --- lib/Transforms/IPO/OpenMPOpt.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Transforms/IPO/OpenMPOpt.cpp b/lib/Transforms/IPO/OpenMPOpt.cpp index 4532ab791ee..1031a55886d 100644 --- a/lib/Transforms/IPO/OpenMPOpt.cpp +++ b/lib/Transforms/IPO/OpenMPOpt.cpp @@ -3698,10 +3698,8 @@ private: } } - if (KnownSPMDCount && KnownNonSPMDCount) - return indicatePessimisticFixpoint(); - - if (AssumedSPMDCount && AssumedNonSPMDCount) + if ((AssumedSPMDCount + KnownSPMDCount) && + (AssumedNonSPMDCount + KnownNonSPMDCount)) return indicatePessimisticFixpoint(); auto &Ctx = getAnchorValue().getContext();