diff options
author | Arnold Schwaighofer <aschwaighofer@apple.com> | 2013-04-12 15:15:19 +0000 |
---|---|---|
committer | Arnold Schwaighofer <aschwaighofer@apple.com> | 2013-04-12 15:15:19 +0000 |
commit | f9cea17f750eea65da0b5a270f57ba2f39908ccc (patch) | |
tree | 162904609406d3768c86cf1486fccd2e731917d0 /llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | |
parent | 755eb32a398c8c47540bc73c5cc8c12076b639f7 (diff) | |
download | bcm5719-llvm-f9cea17f750eea65da0b5a270f57ba2f39908ccc.tar.gz bcm5719-llvm-f9cea17f750eea65da0b5a270f57ba2f39908ccc.zip |
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
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp')
0 files changed, 0 insertions, 0 deletions