[llvm-dev] [LLVMdev] LLVM loop vectorizer
Renato Golin via llvm-dev
llvm-dev at lists.llvm.org
Sat Jun 4 08:57:58 PDT 2016
On 18 September 2015 at 00:49, Mikhail Zolotukhin via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> red.c:6:10: remark: the cost-model indicates that interleaving is not
> beneficial [-Rpass-analysis=loop-vectorize]
Try using:
#pragma clang loop vectorize(enable) interleave(enable)
just before the loop. It should force vectorization even if the cost
model doesn't like it.
This is not a final solution, but may give you a hint at what the
vectortizer thought it could do, and why it wasn't beneficial.
Try running benchmarks with the pragma on and off and see if it really wasn't.
If the vectorized code is better, the cost model was wrong, and we
should update it.
If the vectorized code is worse, and you know of a better way, please
fill a bug in Bugzilla[1] so that we can find what the vectorizer can
do to make it work.
Of course, if you can change the vectorizer yourself and submit
patches, that'd be even better. :)
Please, provide the bug (or the patch proposals) with as much
information on costs and architecture as you can.
cheers,
--renato
[1] https://llvm.org/bugs/
More information about the llvm-dev
mailing list