diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-11-28 14:34:11 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-11-28 14:34:11 +0000 |
commit | 579c2d9d64f891491cebcfcd953c827a34147479 (patch) | |
tree | a0c2835e329a1bc4c1622216f1b360cbad3f6854 /clang-tools-extra/test/clang-tidy/cert-static-object-exception.cpp | |
parent | 30ce962732cc7d22249dc657141a6d7e39f9418e (diff) | |
download | bcm5719-llvm-579c2d9d64f891491cebcfcd953c827a34147479.tar.gz bcm5719-llvm-579c2d9d64f891491cebcfcd953c827a34147479.zip |
[SLP]Fix PR39774: Set ReductionRoot if the original instruction is vectorized.
Summary:
If the original reduction root instruction was vectorized, it might be
removed from the tree. It means that the insertion point may become
invalidated and the whole vectorization of the reduction leads to the
incorrect output result.
The ReductionRoot instruction must be marked as externally used so it
could not be removed. Otherwise it might cause inconsistency with the
cost model and we may end up with too optimistic optimization.
Reviewers: RKSimon, spatel, hfinkel, mkuper
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D54955
llvm-svn: 347759
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/cert-static-object-exception.cpp')
0 files changed, 0 insertions, 0 deletions