1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 05:23:45 +02:00
llvm-mirror/lib/Transforms
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
..
Coroutines [Coroutines] Part 7: Split coroutine into subfunctions 2016-08-16 18:04:14 +00:00
Hello Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
InstCombine [InstCombine] change param type from Instruction to BinaryOperator for icmp helpers; NFCI 2016-08-22 21:24:29 +00:00
Instrumentation [asan] Use 1 byte aligned stores to poison shadow memory 2016-08-22 04:16:14 +00:00
IPO [GraphTraits] Replace all NodeType usage with NodeRef 2016-08-22 21:09:30 +00:00
ObjCARC Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
Scalar Possible fix of test failures on win bots 2016-08-23 18:00:41 +00:00
Utils [MemorySSA] Remove unused field. NFC. 2016-08-22 23:40:01 +00:00
Vectorize [SLP] Avoid signed integer overflow 2016-08-23 20:48:50 +00:00
CMakeLists.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00
LLVMBuild.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00