[llvm] 7aba6a0 - [LV] Fix value that could be read uninitialized.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 09:55:12 PDT 2020
Author: Florian Hahn
Date: 2020-04-06T17:54:50+01:00
New Revision: 7aba6a03331921aa10b023f1a7ec513faf18e3f9
URL: https://github.com/llvm/llvm-project/commit/7aba6a03331921aa10b023f1a7ec513faf18e3f9
DIFF: https://github.com/llvm/llvm-project/commit/7aba6a03331921aa10b023f1a7ec513faf18e3f9.diff
LOG: [LV] Fix value that could be read uninitialized.
This should fix
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/18569
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 eecad0c3d3b5..651a201e4ff9 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -6908,7 +6908,7 @@ VPWidenCallRecipe *VPRecipeBuilder::tryToWidenCall(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 = CM.getVectorCallCost(CI, VF, NeedToScalarize);
bool UseVectorIntrinsic =
ID && CM.getVectorIntrinsicCost(CI, VF) <= CallCost;
More information about the llvm-commits
mailing list