diff options
author | Nadav Rotem <nrotem@apple.com> | 2013-07-16 22:57:06 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2013-07-16 22:57:06 +0000 |
commit | 71cc5e4ea25c27d0b7d410a8ee7a83a19769fdcc (patch) | |
tree | ecfabdb89ce2a5ff8728e7af29860846276b98b6 /lib | |
parent | 7c8a26030faad65d49ecd06a4e51344368b79d8d (diff) | |
download | external_llvm-71cc5e4ea25c27d0b7d410a8ee7a83a19769fdcc.zip external_llvm-71cc5e4ea25c27d0b7d410a8ee7a83a19769fdcc.tar.gz external_llvm-71cc5e4ea25c27d0b7d410a8ee7a83a19769fdcc.tar.bz2 |
flip the scev minus direction to simplify the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186466 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Vectorize/SLPVectorizer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp b/lib/Transforms/Vectorize/SLPVectorizer.cpp index c1e8111..572f343 100644 --- a/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -1004,7 +1004,7 @@ bool BoUpSLP::isConsecutiveAccess(Value *A, Value *B) { // Calculate the distance. const SCEV *PtrSCEVA = SE->getSCEV(PtrA); const SCEV *PtrSCEVB = SE->getSCEV(PtrB); - const SCEV *OffsetSCEV = SE->getMinusSCEV(PtrSCEVA, PtrSCEVB); + const SCEV *OffsetSCEV = SE->getMinusSCEV(PtrSCEVB, PtrSCEVA); const SCEVConstant *ConstOffSCEV = dyn_cast<SCEVConstant>(OffsetSCEV); // Non constant distance. @@ -1013,10 +1013,10 @@ bool BoUpSLP::isConsecutiveAccess(Value *A, Value *B) { int64_t Offset = ConstOffSCEV->getValue()->getSExtValue(); Type *Ty = cast<PointerType>(PtrA->getType())->getElementType(); - // The Instructions are connsecutive if the size of the first load/store is + // The Instructions are consecutive if the size of the first load/store is // the same as the offset. int64_t Sz = DL->getTypeStoreSize(Ty); - return ((-Offset) == Sz); + return (Offset == Sz); } Value *BoUpSLP::getSinkBarrier(Instruction *Src, Instruction *Dst) { |