[PATCH] D59784: [SLPVectorizer] Merge reorderAltShuffleOperands into reorderInputsAccordingToOpcode
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 11:34:05 PDT 2019
ABataev added inline comments.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:2917
if (isConsecutiveAccess(L, L1, *DL, *SE)) {
- std::swap(Left[j + 1], Right[j + 1]);
- continue;
+ Instruction *VL1 = cast<Instruction>(VL[j]);
+ Instruction *VL2 = cast<Instruction>(VL[j + 1]);
----------------
`auto * VL`
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:2921
+ std::swap(Left[j + 1], Right[j + 1]);
+ continue;
+ } else if (VL1->isCommutative()) {
----------------
Either use `continue;` here or `else` in `else if`. Only `if` is going to be enough.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:2932
if (isConsecutiveAccess(L, L1, *DL, *SE)) {
- std::swap(Left[j + 1], Right[j + 1]);
- continue;
+ Instruction *VL1 = cast<Instruction>(VL[j]);
+ Instruction *VL2 = cast<Instruction>(VL[j + 1]);
----------------
`auto *VL`
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:2937
+ continue;
+ } else if (VL1->isCommutative()) {
+ std::swap(Left[j], Right[j]);
----------------
Again, you may remove `else` here
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59784/new/
https://reviews.llvm.org/D59784
More information about the llvm-commits
mailing list