Revert [IPSCCP] Add assertion to surface cases where we zap returns with overdefined...
authorFlorian Hahn <flo@fhahn.com>
Fri, 26 Jul 2019 22:14:08 +0000 (22:14 +0000)
committerFlorian Hahn <flo@fhahn.com>
Fri, 26 Jul 2019 22:14:08 +0000 (22:14 +0000)
This reverts r366998 (git commit 5354c83ece00690b4dbfa47925f8f5a8f33f1d9e)

This breaks a linux kernel build and we have reproducer to investigate.

llvm-svn: 367160

llvm/lib/Transforms/Scalar/SCCP.cpp

index 6396115..4093e50 100644 (file)
@@ -1924,21 +1924,6 @@ static void findReturnsToZap(Function &F,
     return;
   }
 
-  assert(
-      all_of(F.users(),
-             [&Solver](User *U) {
-               if (isa<Instruction>(U) &&
-                   !Solver.isBlockExecutable(cast<Instruction>(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 "