From e021f703dbd411b11af185263a8bb6de2e6b7489 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 13 Nov 2017 18:43:11 +0000 Subject: [PATCH] Fix clang -Wsometimes-uninitialized warning in SCEV code I don't believe this was a problem in practice, as it's likely that the boolean wasn't checked unless the backend condition was non-null. llvm-svn: 318073 --- llvm/lib/Analysis/ScalarEvolution.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 7795a33..a643db8 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -4088,7 +4088,7 @@ class SCEVBackedgeConditionFolder public: static const SCEV *rewrite(const SCEV *S, const Loop *L, ScalarEvolution &SE) { - bool IsPosBECond; + bool IsPosBECond = false; Value *BECond = nullptr; if (BasicBlock *Latch = L->getLoopLatch()) { BranchInst *BI = dyn_cast(Latch->getTerminator()); -- 2.7.4