llvm-project/llvm/test/Transforms/SLPVectorizer/AArch64
Alexey Bataev dfec81107f [SLP] Fix for PR32038: extra add of PHI node when it is not required.
Summary:
If horizontal reduction tree starts from the binary operation that is
used in PHI node, but this PHI is not used in horizontal reduction, we
may end up with extra addition of this PHI node after vectorization.
Here is an example:
```
%phi = phi i32 [ %tmp, %end], ...
...
%tmp = add i32 %tmp1, %tmp2
end:
```
after vectorization we always have something like:

```
%phi = phi i32 [ %tmp, %end], ...
...
%red = extractelement <8 x 32> %vec.red, 0
%tmp = add i32 %red, %phi
end:
```
even if `%phi` is not used in reduction tree. Patch considers these PHI
nodes as extra arguments and considers them in the final result iff they
really used in reduction.

Reviewers: mkuper, hfinkel, mzolotukhin

Subscribers: llvm-commits

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

llvm-svn: 296606
2017-03-01 10:50:44 +00:00
..
commute.ll
gather-reduce.ll [TTI] Add hook for vector extract with extension 2016-04-27 15:20:21 +00:00
gather-root.ll [SLP] Fix for PR32038: extra add of PHI node when it is not required. 2017-03-01 10:50:44 +00:00
getelementptr.ll
horizontal.ll
lit.local.cfg
load-store-q.ll
minimum-sizes.ll Reapply commit r259357 with a fix for PR26629 2016-02-18 14:14:40 +00:00
mismatched-intrinsics.ll
nontemporal.ll
sdiv-pow2.ll