diff --git a/llvm/lib/Transforms/IPO/SCCP.cpp b/llvm/lib/Transforms/IPO/SCCP.cpp index 9d15dd0c10388..43c5df3575003 100644 --- a/llvm/lib/Transforms/IPO/SCCP.cpp +++ b/llvm/lib/Transforms/IPO/SCCP.cpp @@ -76,10 +76,8 @@ static void findReturnsToZap(Function &F, if (!isa(U)) return true; if (U->getType()->isStructTy()) { - return all_of(Solver.getStructLatticeValueFor(U), - [](const ValueLatticeElement &LV) { - return !SCCPSolver::isOverdefined(LV); - }); + return none_of(Solver.getStructLatticeValueFor(U), + SCCPSolver::isOverdefined); } // We don't consider assume-like intrinsics to be actual address