[PATCH] D87772: [SLP] sort candidates to increase chance of optimal compare reduction
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 16 09:12:21 PDT 2020
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6944
}
i += ReduxWidth;
ReduxWidth = PowerOf2Floor(NumReducedVals - i);
----------------
Maybe, better to change this expression too? The main problem here is that the sliding window has step `ReduxWidth`. Maybe, use `1` here in common case? Also, I don't think sorting is safe here. It is better to keep the original order of the instructions, but pre-select only the matching ones.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87772/new/
https://reviews.llvm.org/D87772
More information about the llvm-commits
mailing list