aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Vectorize/SLPVectorizer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Vectorize/SLPVectorizer.cpp')
-rw-r--r--lib/Transforms/Vectorize/SLPVectorizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp b/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 8a1c5b7..78f7783 100644
--- a/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -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