llvm-project/llvm/lib/Transforms
Alexey Bataev b551a81c28 [SLP] Fix for PR32036: Vectorized horizontal reduction returning wrong result
Summary:
If the same value is used several times as an extra value, SLP
vectorizer takes it into account only once instead of actual number of
using.
For example:
```
int val = 1;
for (int y = 0; y < 8; y++) {
  for (int x = 0; x < 8; x++) {
    val = val + input[y * 8 + x] + 3;
  }
}
```
We have 2 extra rguments: `1` - initial value of horizontal reduction
and `3`, which is added 8*8 times to the reduction. Before the patch we
added `1` to the reduction value and added once `3`, though it must be
added 64 times.

Reviewers: mkuper, mzolotukhin

Subscribers: llvm-commits

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

llvm-svn: 295868
2017-02-22 20:06:40 +00:00
..
Coroutines [Coroutines] Add header guard to header that's missing one. 2017-01-30 16:32:20 +00:00
Hello Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
IPO Increases full-unroll threshold. 2017-02-18 03:46:51 +00:00
InstCombine AMDGPU: Add cvt.pkrtz intrinsic 2017-02-22 00:27:34 +00:00
Instrumentation AddressSanitizer: don't track swifterror memory addresses 2017-02-15 20:43:43 +00:00
ObjCARC [CMake] NFC. Updating CMake dependency specifications 2016-11-17 04:36:50 +00:00
Scalar [LoopUnroll] Enable PGO-based loop peeling by default. 2017-02-22 00:27:34 +00:00
Utils Use const-ref in range-loop for to avoid copying pairs of std::string 2017-02-22 06:34:04 +00:00
Vectorize [SLP] Fix for PR32036: Vectorized horizontal reduction returning wrong result 2017-02-22 20:06:40 +00:00
CMakeLists.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00
LLVMBuild.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00