[PATCH] D28907: [SLP] Fix for PR30787: Failure to beneficially vectorize 'copyable' elements in integer binary ops.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 19 08:56:26 PST 2017


ABataev created this revision.

Patch tries to improve vectorization of the following code:

  void add1(int * __restrict dst, const int * __restrict src) {
    *dst++ = *src++;
    *dst++ = *src++ + 1;
    *dst++ = *src++ + 2;
    *dst++ = *src++ + 3;
  }

Currently this code cannot be vectorized because the very first operation is not a binary add, but just a load.


https://reviews.llvm.org/D28907

Files:
  lib/Transforms/Vectorize/SLPVectorizer.cpp
  test/Transforms/SLPVectorizer/X86/vect_copyable_in_binops.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28907.84977.patch
Type: text/x-patch
Size: 110960 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170119/4195b203/attachment.bin>


More information about the llvm-commits mailing list