diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 2f0493aa8821..a5100d022778 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -2675,7 +2675,7 @@ bool ScalarEvolutionsImpl::executesAtLeastOnce(const Loop *L, bool isSigned, return false; } - if (PreCondLHS->getType()->isInteger()) return false; + if (!PreCondLHS->getType()->isInteger()) return false; return LHS == getSCEV(PreCondLHS) && RHS == getSCEV(PreCondRHS); }