aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorYingwei Zheng <dtcxzyw2333@gmail.com>2025-08-10 14:43:40 +0800
committerGitHub <noreply@github.com>2025-08-10 14:43:40 +0800
commit2242e28671c43f014d4e4e185d7ebde25bfd84a5 (patch)
tree28e13f229b0d4396a66140fe3c661bc1587b86a9 /llvm/lib
parent052c38be824d9dabb1e8fb64c1c7c3908d786e83 (diff)
downloadllvm-2242e28671c43f014d4e4e185d7ebde25bfd84a5.zip
llvm-2242e28671c43f014d4e4e185d7ebde25bfd84a5.tar.gz
llvm-2242e28671c43f014d4e4e185d7ebde25bfd84a5.tar.bz2
[Analysis] Remove an unreachable check. NFC. (#152874)
Binops never produce pointer values.
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/Loads.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp
index 78d0887..9a2c9ba 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;