[llvm] r186531 - Add a micro optimization to catch cases where the PtrA equals PtrB.
Nadav Rotem
nrotem at apple.com
Wed Jul 17 12:52:25 PDT 2013
Author: nadav
Date: Wed Jul 17 14:52:25 2013
New Revision: 186531
URL: http://llvm.org/viewvc/llvm-project?rev=186531&view=rev
Log:
Add a micro optimization to catch cases where the PtrA equals PtrB.
Modified:
llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=186531&r1=186530&r2=186531&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Wed Jul 17 14:52:25 2013
@@ -980,7 +980,7 @@ bool BoUpSLP::isConsecutiveAccess(Value
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
More information about the llvm-commits
mailing list