Skip to content

Commit

Permalink
Add a micro optimization to catch cases where the PtrA equals PtrB.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186531 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
nadavrot committed Jul 17, 2013
1 parent 24ff484 commit e65b219
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Transforms/Vectorize/SLPVectorizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ bool BoUpSLP::isConsecutiveAccess(Value *A, Value *B) {
return false;

// Check that A and B are of the same type.
if (PtrA->getType() != PtrB->getType())
if (PtrA == PtrB || PtrA->getType() != PtrB->getType())
return false;

// Calculate a constant offset from the base pointer without using SCEV
Expand Down

0 comments on commit e65b219

Please sign in to comment.