[llvm] 01a91a6 - Fix static analyzer uninitialized variable warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 06:22:53 PST 2020
Author: Simon Pilgrim
Date: 2020-03-05T14:22:24Z
New Revision: 01a91a6de79d1ab98a9b1ac44b85cf1eaa085bc5
URL: https://github.com/llvm/llvm-project/commit/01a91a6de79d1ab98a9b1ac44b85cf1eaa085bc5
DIFF: https://github.com/llvm/llvm-project/commit/01a91a6de79d1ab98a9b1ac44b85cf1eaa085bc5.diff
LOG: Fix static analyzer uninitialized variable warning. NFCI.
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 283cc9cf8714..ffee9d3160e0 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4354,7 +4354,7 @@ void InnerLoopVectorizer::widenInstruction(Instruction &I) {
// The flag shows whether we use Intrinsic or a usual Call for vectorized
// version of the instruction.
// Is it beneficial to perform intrinsic call compared to lib call?
- bool NeedToScalarize;
+ bool NeedToScalarize = false;
unsigned CallCost = Cost->getVectorCallCost(CI, VF, NeedToScalarize);
bool UseVectorIntrinsic =
ID && Cost->getVectorIntrinsicCost(CI, VF) <= CallCost;
More information about the llvm-commits
mailing list