diff options
author | Nadav Rotem <nrotem@apple.com> | 2013-07-17 19:52:25 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2013-07-17 19:52:25 +0000 |
commit | 3072baeb9ce48f00b74627f2fab49bf66571bff8 (patch) | |
tree | d2bcc8764758c8f3e70b3eaf6595d92434e7b9e6 /llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | |
parent | 16431fe7a7561b6332011ff6caca9bb34c1f03de (diff) | |
download | bcm5719-llvm-3072baeb9ce48f00b74627f2fab49bf66571bff8.tar.gz bcm5719-llvm-3072baeb9ce48f00b74627f2fab49bf66571bff8.zip |
Add a micro optimization to catch cases where the PtrA equals PtrB.
llvm-svn: 186531
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 8a1c5b7bca9..78f7783328d 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/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 |