projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfacdd0
)
Handle constants without going through SCEV.
author
Nadav Rotem
<nrotem@apple.com>
Thu, 18 Jul 2013 18:34:21 +0000
(18:34 +0000)
committer
Nadav Rotem
<nrotem@apple.com>
Thu, 18 Jul 2013 18:34:21 +0000
(18:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186593
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Vectorize/SLPVectorizer.cpp
b/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 3629eeec173909b9d78d1292af39c47ee484397a..f1da774ede536a0314ef924379af21e6c82bdb90 100644
(file)
--- a/
lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/
lib/Transforms/Vectorize/SLPVectorizer.cpp
@@
-1033,6
+1033,12
@@
bool BoUpSLP::isConsecutiveAccess(Value *A, Value *B) {
if (GepA && GepA->getPointerOperand() == PtrB)
return false;
+ ConstantInt *CA = dyn_cast<ConstantInt>(PtrA);
+ ConstantInt *CB = dyn_cast<ConstantInt>(PtrB);
+ if (CA && CB) {
+ return (CA->getSExtValue() + Sz == CB->getSExtValue());
+ }
+
// Calculate the distance.
const SCEV *PtrSCEVA = SE->getSCEV(PtrA);
const SCEV *PtrSCEVB = SE->getSCEV(PtrB);