[llvm] 2242e28 - [Analysis] Remove an unreachable check. NFC. (#152874)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 9 23:43:43 PDT 2025
Author: Yingwei Zheng
Date: 2025-08-10T14:43:40+08:00
New Revision: 2242e28671c43f014d4e4e185d7ebde25bfd84a5
URL: https://github.com/llvm/llvm-project/commit/2242e28671c43f014d4e4e185d7ebde25bfd84a5
DIFF: https://github.com/llvm/llvm-project/commit/2242e28671c43f014d4e4e185d7ebde25bfd84a5.diff
LOG: [Analysis] Remove an unreachable check. NFC. (#152874)
Binops never produce pointer values.
Added:
Modified:
llvm/lib/Analysis/Loads.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp
index 78d0887d5d87e..9a2c9ba63ec7e 100644
--- a/llvm/lib/Analysis/Loads.cpp
+++ b/llvm/lib/Analysis/Loads.cpp
@@ -276,8 +276,7 @@ static bool AreEquivalentAddressValues(const Value *A, const Value *B) {
// this function is only used when one address use dominates the
// other, which means that they'll always either have the same
// value or one of them will have an undefined value.
- if (isa<BinaryOperator>(A) || isa<CastInst>(A) || isa<PHINode>(A) ||
- isa<GetElementPtrInst>(A))
+ if (isa<CastInst>(A) || isa<PHINode>(A) || isa<GetElementPtrInst>(A))
if (const Instruction *BI = dyn_cast<Instruction>(B))
if (cast<Instruction>(A)->isIdenticalToWhenDefined(BI))
return true;
More information about the llvm-commits
mailing list