mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-10 22:43:46 +00:00
[SLPVectorizer] Swap the checking order of isCommutative and isConsecutiveAccess
NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258909 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
903845e2b0
commit
2e1b6ea21c
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user