[llvm] [DSE] Fix uninitialized variable (PR #142768)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 4 04:46:39 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: None (clubby789)
<details>
<summary>Changes</summary>
Introduced by accident in #<!-- -->138299 (https://lab.llvm.org/buildbot/#/builders/164/builds/10604)
cc @<!-- -->nikic
---
Full diff: https://github.com/llvm/llvm-project/pull/142768.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 59a08e58b226a..49a0c88922c3e 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -2029,7 +2029,7 @@ struct DSEState {
auto *InnerCallee = Malloc->getCalledFunction();
if (!InnerCallee)
return false;
- LibFunc Func;
+ LibFunc Func = NotLibFunc;
StringRef ZeroedVariantName;
if (!TLI.getLibFunc(*InnerCallee, Func) || !TLI.has(Func) ||
Func != LibFunc_malloc) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/142768
More information about the llvm-commits
mailing list