Skip to content

Commit 7780015

Browse files
[Analysis] Fix a warning
This patch fixes: llvm/lib/Analysis/LoopAccessAnalysis.cpp:1530:9: error: unused variable 'Ty' [-Werror,-Wunused-variable]
1 parent 0301bf9 commit 7780015

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,8 +1527,7 @@ llvm::getPtrStride(PredicatedScalarEvolution &PSE, Type *AccessTy, Value *Ptr,
15271527
if (PSE.getSE()->isLoopInvariant(PtrScev, Lp))
15281528
return 0;
15291529

1530-
Type *Ty = Ptr->getType();
1531-
assert(Ty->isPointerTy() && "Unexpected non-ptr");
1530+
assert(Ptr->getType()->isPointerTy() && "Unexpected non-ptr");
15321531
if (isa<ScalableVectorType>(AccessTy)) {
15331532
LLVM_DEBUG(dbgs() << "LAA: Bad stride - Scalable object: " << *AccessTy
15341533
<< "\n");

0 commit comments

Comments
 (0)