llvm-project/llvm
Anna Thomas 00dc1b74b7 [LV] Avoid vectorizing first order recurrence when phi uses are outside loop
In the vectorization of first order recurrence, we vectorize such
that the last element in the vector will be the one extracted to pass into the
scalar remainder loop. However, this is not true when there is a phi (other
than the primary induction variable) is used outside the loop.
In such a case, we need the value from the second last iteration (i.e.
the phi value), not the last iteration (which would be the phi update).
I've added a test case for this. Also see PR32396.

A follow up patch would generate the correct code gen for such cases,
and turn this vectorization on.

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

Reviewers: mssimpso
llvm-svn: 299985
2017-04-11 21:02:00 +00:00
..
bindings Go binding: Add GetCurrentDebugLocation to obtain debug location from builder 2017-03-31 04:59:57 +00:00
cmake Respect CMAKE_INSTALL_MANDIR for sphinx generated manpages 2017-04-05 14:49:46 +00:00
docs Allow DataLayout to specify addrspace for allocas. 2017-04-10 22:27:50 +00:00
examples Module::getOrInsertFunction is using C-style vararg instead of variadic templates. 2017-04-11 15:01:18 +00:00
include MemorySSA: Move to Analysis, from Transforms/Utils. It's used as 2017-04-11 20:06:36 +00:00
lib [LV] Avoid vectorizing first order recurrence when phi uses are outside loop 2017-04-11 21:02:00 +00:00
projects [cmake] Include openmp with add_llvm_external_project 2017-03-07 18:54:17 +00:00
resources
runtimes [CMake] Support single target builtins build on Darwin 2017-03-24 02:21:11 +00:00
test [LV] Avoid vectorizing first order recurrence when phi uses are outside loop 2017-04-11 21:02:00 +00:00
tools llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
unittests MemorySSA: Move to Analysis, from Transforms/Utils. It's used as 2017-04-11 20:06:36 +00:00
utils [lit] Try using process pools by default again 2017-04-07 15:28:32 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore gitignore: Ignore .vs folder (VS2017 config files) 2017-04-08 00:16:58 +00:00
CMakeLists.txt [CMake] Provide an option to disable runtimes build 2017-03-23 22:40:10 +00:00
CODE_OWNERS.TXT CODE_OWNERS: Take code ownership of instruction scheduling. 2017-03-10 18:34:37 +00:00
CREDITS.TXT CODE_OWNERS: Take code ownership of instruction scheduling. 2017-03-10 18:34:37 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt Test commit. Added a blank line. 2017-03-06 20:45:33 +00:00
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.