]> granicus.if.org Git - llvm/commit
[SLPVectorizer] Failure to beneficially vectorize 'copyable' elements in integer...
authorDinar Temirbulatov <dtemirbulatov@gmail.com>
Fri, 1 Dec 2017 11:10:47 +0000 (11:10 +0000)
committerDinar Temirbulatov <dtemirbulatov@gmail.com>
Fri, 1 Dec 2017 11:10:47 +0000 (11:10 +0000)
commit8caaeced908bdf080326e1fc9de3ce5a89419bcd
treeec325c2be5bc3c23911e0972301a6719f3074acb
parent15994eff2b58df2c83fc75c664045821cd8c95da
[SLPVectorizer] Failure to beneficially vectorize 'copyable' elements in integer binary ops.

            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;
            }
            Allows to vectorize even if the very first operation is not a binary add, but just a load.

            Fixed issues related to previous commit.

            Reviewers: spatel, mzolotukhin, mkuper, hfinkel, RKSimon, filcab, ABataev

            Reviewed By: ABataev, RKSimon

            Subscribers: llvm-commits, RKSimon

            Differential Revision: https://reviews.llvm.org/D28907

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319531 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/SystemZ/pr34619.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/load-dominate.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/vect_copyable_in_binops.ll