Fix static analyzer uninitialized variable warning. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 5 Mar 2020 12:42:50 +0000 (12:42 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 5 Mar 2020 14:22:24 +0000 (14:22 +0000)
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

index 283cc9c..ffee9d3 100644 (file)
@@ -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;