[PATCH] D13551: [LoopVectorize] Shrink integer operations into the smallest type possible

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 03:04:38 PDT 2015


Hi,

Ah yes - you asked about benchmarking numbers. LNT and Spec showed no real
changes - there were a couple of modest improvements in LNT. For this patch
I would expect the biggest benefit in small, hot loops using i8 or i16
types. This patch doesn't *enable* vectorization for these types, it just
improves the cost model and makes sure we use the right vector types in all
cases. In many trivial cases we were already vectorizing assuming i32
promotion and InstCombine was removing the promotion afterwards.

Image filters are the best example of code that will improve, and we don't
have any in LNT or Spec. I have examples of image filters in the
test-suite. I do have examples in third-party test suites that show upwards
of 100% improvement with this patch.

Cheers,

James

On Mon, 12 Oct 2015 at 09:40 James Molloy via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> jmolloy updated this revision to Diff 37083.
> jmolloy added a comment.
>
> Hi Silviu,
>
> Thanks for the review. Updated diff attached.
>
> Cheers,
>
> James
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D13551
>
> Files:
>   include/llvm/Analysis/VectorUtils.h
>   lib/Analysis/VectorUtils.cpp
>   lib/Transforms/Vectorize/LoopVectorize.cpp
>   test/Transforms/LoopVectorize/AArch64/loop-vectorization-factors.ll
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151012/096834e0/attachment.html>


More information about the llvm-commits mailing list