[llvm] 69d0746 - [Lint] Use poison instead of undef for self-referential values
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 07:32:11 PDT 2024
Author: Nikita Popov
Date: 2024-06-24T16:32:03+02:00
New Revision: 69d07465c5cb0194d15dfe75b058957fd6ab16c8
URL: https://github.com/llvm/llvm-project/commit/69d07465c5cb0194d15dfe75b058957fd6ab16c8
DIFF: https://github.com/llvm/llvm-project/commit/69d07465c5cb0194d15dfe75b058957fd6ab16c8.diff
LOG: [Lint] Use poison instead of undef for self-referential values
Added:
Modified:
llvm/lib/Analysis/Lint.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/Lint.cpp b/llvm/lib/Analysis/Lint.cpp
index 1ab856ac8830a..e9ed0c22c8e37 100644
--- a/llvm/lib/Analysis/Lint.cpp
+++ b/llvm/lib/Analysis/Lint.cpp
@@ -647,7 +647,7 @@ Value *Lint::findValueImpl(Value *V, bool OffsetOk,
SmallPtrSetImpl<Value *> &Visited) const {
// Detect self-referential values.
if (!Visited.insert(V).second)
- return UndefValue::get(V->getType());
+ return PoisonValue::get(V->getType());
// TODO: Look through sext or zext cast, when the result is known to
// be interpreted as signed or unsigned, respectively.
More information about the llvm-commits
mailing list