llvm-project/llvm/lib/Transforms/Vectorize
Matthew Simpson 364da7e527 [LV] Scalarize operands of predicated instructions
This patch attempts to scalarize the operand expressions of predicated
instructions if they were conditionally executed in the original loop. After
scalarization, the expressions will be sunk inside the blocks created for the
predicated instructions. The transformation essentially performs
un-if-conversion on the operands.

The cost model has been updated to determine if scalarization is profitable. It
compares the cost of a vectorized instruction, assuming it will be
if-converted, to the cost of the scalarized instruction, assuming that the
instructions corresponding to each vector lane will be sunk inside a predicated
block, possibly avoiding execution. If it's more profitable to scalarize the
entire expression tree feeding the predicated instruction, the expression will
be scalarized; otherwise, it will be vectorized. We only consider the cost of
the entire expression to accurately estimate the cost of the required
insertelement and extractelement instructions.

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

llvm-svn: 288909
2016-12-07 15:03:32 +00:00
..
BBVectorize.cpp IR: Remove Value::intersectOptionalDataWith, replace all calls with calls to Instruction::andIRFlags. 2016-09-07 23:39:04 +00:00
CMakeLists.txt [CMake] NFC. Updating CMake dependency specifications 2016-11-17 04:36:50 +00:00
LLVMBuild.txt Update libdeps since TLI was moved from Target to Analysis in r226078. 2015-01-15 05:21:00 +00:00
LoadStoreVectorizer.cpp [LoadStoreVectorizer] Enable vectorization of stores in the presence of an aliasing load 2016-11-23 17:43:15 +00:00
LoopVectorize.cpp [LV] Scalarize operands of predicated instructions 2016-12-07 15:03:32 +00:00
SLPVectorizer.cpp Revert "[SLP] Fix for PR6246: vectorization for scalar ops on vector elements." 2016-12-02 16:56:26 +00:00
Vectorize.cpp Add LoadStoreVectorizer pass 2016-06-30 23:11:38 +00:00