From 0c0a05f861fc11bec54a358bf99f04f9bff5865a Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Fri, 26 Jul 2019 22:14:08 +0000 Subject: [PATCH] Revert [IPSCCP] Add assertion to surface cases where we zap returns with overdefined users. This reverts r366998 (git commit 5354c83ece00690b4dbfa47925f8f5a8f33f1d9e) This breaks a linux kernel build and we have reproducer to investigate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367160 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/SCCP.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 6396115129e..4093e50ce89 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -1924,21 +1924,6 @@ static void findReturnsToZap(Function &F, return; } - assert( - all_of(F.users(), - [&Solver](User *U) { - if (isa(U) && - !Solver.isBlockExecutable(cast(U)->getParent())) - return false; - if (U->getType()->isStructTy()) { - return all_of( - Solver.getStructLatticeValueFor(U), - [](const LatticeVal &LV) { return !LV.isOverdefined(); }); - } - return !Solver.getLatticeValueFor(U).isOverdefined(); - }) && - "We can only zap functions where all live users have a concrete value"); - for (BasicBlock &BB : F) { if (CallInst *CI = BB.getTerminatingMustTailCall()) { LLVM_DEBUG(dbgs() << "Can't zap return of the block due to present " -- 2.40.0