1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib/Transforms/Vectorize
Arnold Schwaighofer 48b1c3e915 LoopVectorizer: integer division is not a reduction operation
Don't classify idiv/udiv as a reduction operation. Integer division is lossy.
For example : (1 / 2) * 4 != 4/2.

Example:

int a[] = { 2, 5, 2, 2}
int x = 80;

for()
  x /= a[i];

Scalar:
  x /= 2 // = 40
  x /= 5 // = 8
  x /= 2 // = 4
  x /= 2 // = 2

Vectorized:

 <80, 1> / <2,5> //= <40,0>
 <40, 0> / <2,2> //= <20,0>

 20*0 = 0

radar://13640654

llvm-svn: 179381
2013-04-12 15:15:19 +00:00
..
BBVectorize.cpp BBVectorize: Fixup debugging statements 2013-03-10 20:57:42 +00:00
CMakeLists.txt Add support for bottom-up SLP vectorization infrastructure. 2013-04-09 19:44:35 +00:00
LLVMBuild.txt
LoopVectorize.cpp LoopVectorizer: integer division is not a reduction operation 2013-04-12 15:15:19 +00:00
Makefile
SLPVectorizer.cpp Make the SLP store-merger less paranoid about function calls. We check for function calls when we check if it is safe to sink instructions. 2013-04-10 19:41:36 +00:00
Vectorize.cpp Rename the C function to create a SLPVectorizerPass to something sane and expose it in the header file. 2013-04-11 11:36:36 +00:00
VecUtils.cpp We require DataLayout for analyzing the size of stores. 2013-04-10 18:57:27 +00:00
VecUtils.h Add support for bottom-up SLP vectorization infrastructure. 2013-04-09 19:44:35 +00:00