llvm-mirror/test/Transforms/SLPVectorizer/AArch64
Matthew Simpson b74ea1ef12 [SLP] Avoid signed integer overflow
The test case included with r279125 exposed an existing signed integer
overflow. Since getTreeCost can return INT_MAX, we can't sum this cost together
with other costs, such as getReductionCost.

This patch removes the possibility of assigning a cost of INT_MAX. Since we
were previously using INT_MAX as an indicator for "should not vectorize", we
now explicitly check this condition with "isTreeTinyAndNotFullyVectorizable"
before computing a cost.

This patch adds a run-line to the test case used for r279125 that ensures we
don't vectorize. Previously, this line would vectorize the test case by chance
due to undefined behavior in the cost calculation.

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

llvm-svn: 279562
2016-08-23 20:48:50 +00:00
..
commute.ll
gather-reduce.ll
gather-root.ll [SLP] Avoid signed integer overflow 2016-08-23 20:48:50 +00:00
getelementptr.ll
horizontal.ll
lit.local.cfg
load-store-q.ll
minimum-sizes.ll
mismatched-intrinsics.ll
nontemporal.ll
sdiv-pow2.ll