diff options
| author | Haicheng Wu <haicheng@codeaurora.org> | 2016-01-27 04:59:05 +0000 |
|---|---|---|
| committer | Haicheng Wu <haicheng@codeaurora.org> | 2016-01-27 04:59:05 +0000 |
| commit | 76873b6039917872249ed00817c8291db49660ba (patch) | |
| tree | 16c6b3bf3e665067a5bb40b580a70c52b4cc2bfa /llvm/lib/Transforms/Vectorize | |
| parent | 4962bd737feb27bb74d9ac6639a25719ec0f1f79 (diff) | |
| download | bcm5719-llvm-76873b6039917872249ed00817c8291db49660ba.tar.gz bcm5719-llvm-76873b6039917872249ed00817c8291db49660ba.zip | |
[SLPVectorizer] Swap the checking order of isCommutative and isConsecutiveAccess
NFC
llvm-svn: 258909
Diffstat (limited to 'llvm/lib/Transforms/Vectorize')
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 8989b13cccc..295cd52f1e6 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -1854,10 +1854,10 @@ void BoUpSLP::reorderAltShuffleOperands(ArrayRef<Value *> VL, if (LoadInst *L1 = dyn_cast<LoadInst>(Right[j + 1])) { Instruction *VL1 = cast<Instruction>(VL[j]); Instruction *VL2 = cast<Instruction>(VL[j + 1]); - if (isConsecutiveAccess(L, L1, DL, *SE) && VL1->isCommutative()) { + if (VL1->isCommutative() && isConsecutiveAccess(L, L1, DL, *SE)) { std::swap(Left[j], Right[j]); continue; - } else if (isConsecutiveAccess(L, L1, DL, *SE) && VL2->isCommutative()) { + } else if (VL2->isCommutative() && isConsecutiveAccess(L, L1, DL, *SE)) { std::swap(Left[j + 1], Right[j + 1]); continue; } @@ -1868,10 +1868,10 @@ void BoUpSLP::reorderAltShuffleOperands(ArrayRef<Value *> VL, if (LoadInst *L1 = dyn_cast<LoadInst>(Left[j + 1])) { Instruction *VL1 = cast<Instruction>(VL[j]); Instruction *VL2 = cast<Instruction>(VL[j + 1]); - if (isConsecutiveAccess(L, L1, DL, *SE) && VL1->isCommutative()) { + if (VL1->isCommutative() && isConsecutiveAccess(L, L1, DL, *SE)) { std::swap(Left[j], Right[j]); continue; - } else if (isConsecutiveAccess(L, L1, DL, *SE) && VL2->isCommutative()) { + } else if (VL2->isCommutative() && isConsecutiveAccess(L, L1, DL, *SE)) { std::swap(Left[j + 1], Right[j + 1]); continue; } |

