]> granicus.if.org Git - llvm/commit
[SLP] Preserve IR flags when vectorizing horizontal reductions.
authorAlexey Bataev <a.bataev@hotmail.com>
Wed, 1 Mar 2017 12:43:39 +0000 (12:43 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Wed, 1 Mar 2017 12:43:39 +0000 (12:43 +0000)
commit8d23745f59b90c6229cb58fb65ef8cf2725826ea
treec6ad8636f95d9193d4556f223cf9f4677ff443c0
parentb25d8fc2fa2a7509aab1d7e83fbbdc4e57c0d2c0
[SLP] Preserve IR flags when vectorizing horizontal reductions.

Summary:
The SLP vectorizer should propagate IR-level optimization hints/flags
(nsw, nuw, exact, fast-math) when converting scalar horizontal
reductions instructions into vectors, just like for other vectorized
instructions.
It doe not include IR propagation for extra arguments, we need to handle
original scalar operations for extra args to propagate correct flags.

Reviewers: mkuper, mzolotukhin, hfinkel

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296614 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/horizontal.ll
test/Transforms/SLPVectorizer/X86/scheduling.ll