Skip to content

Commit 2242e28

Browse files
authored
[Analysis] Remove an unreachable check. NFC. (#152874)
Binops never produce pointer values.
1 parent 052c38b commit 2242e28

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Analysis/Loads.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@ static bool AreEquivalentAddressValues(const Value *A, const Value *B) {
276276
// this function is only used when one address use dominates the
277277
// other, which means that they'll always either have the same
278278
// value or one of them will have an undefined value.
279-
if (isa<BinaryOperator>(A) || isa<CastInst>(A) || isa<PHINode>(A) ||
280-
isa<GetElementPtrInst>(A))
279+
if (isa<CastInst>(A) || isa<PHINode>(A) || isa<GetElementPtrInst>(A))
281280
if (const Instruction *BI = dyn_cast<Instruction>(B))
282281
if (cast<Instruction>(A)->isIdenticalToWhenDefined(BI))
283282
return true;

0 commit comments

Comments
 (0)