diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-07-22 17:57:36 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-07-22 17:57:36 +0000 |
commit | 3ebd2fe91a3ee4a02be1fffe60bf62b9910ace81 (patch) | |
tree | 3baf4041ec98afe6adf8b782445d65f4e561c9d8 /llvm/lib | |
parent | 5874a28ac56dc50cee72f30b729cbc03b35f3db9 (diff) | |
download | bcm5719-llvm-3ebd2fe91a3ee4a02be1fffe60bf62b9910ace81.tar.gz bcm5719-llvm-3ebd2fe91a3ee4a02be1fffe60bf62b9910ace81.zip |
[SLPVectorizer] Fix some MSVC/cppcheck uninitialized variable warnings. NFCI.
llvm-svn: 366712
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 27a86c0bca9..804a1e889ec 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -3933,7 +3933,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E) { Instruction::isCast(S.getAltOpcode()))) && "Invalid Shuffle Vector Operand"); - Value *LHS, *RHS; + Value *LHS = nullptr, *RHS = nullptr; if (Instruction::isBinaryOp(S.getOpcode())) { setInsertPointAfterBundle(E->Scalars, S); LHS = vectorizeTree(E->getOperand(0)); @@ -5571,7 +5571,7 @@ class HorizontalReduction { Value *createOp(IRBuilder<> &Builder, const Twine &Name) const { assert(isVectorizable() && "Expected add|fadd or min/max reduction operation."); - Value *Cmp; + Value *Cmp = nullptr; switch (Kind) { case RK_Arithmetic: return Builder.CreateBinOp((Instruction::BinaryOps)Opcode, LHS, RHS, @@ -6323,7 +6323,7 @@ private: IsPairwiseReduction = PairwiseRdxCost < SplittingRdxCost; int VecReduxCost = IsPairwiseReduction ? PairwiseRdxCost : SplittingRdxCost; - int ScalarReduxCost; + int ScalarReduxCost = 0; switch (ReductionData.getKind()) { case RK_Arithmetic: ScalarReduxCost = |