aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Vectorize/LoopVectorize.cpp
diff options
context:
space:
mode:
authorPaul Redmond <paul.redmond@intel.com>2013-01-04 22:10:16 +0000
committerPaul Redmond <paul.redmond@intel.com>2013-01-04 22:10:16 +0000
commit5767d919569f7b4be51c0a13bff24f722625d9f3 (patch)
treefdeba97aeb1434f7c6b6adcc693d69a129d2f627 /lib/Transforms/Vectorize/LoopVectorize.cpp
parent8cab6edf4fa46d9bd06ff3ce0e1dd4557be58b65 (diff)
Do not vectorize loops with subtraction reductions
Since subtraction does not commute the loop vectorizer incorrectly vectorizes reductions such as x = A[i] - x. Disabling for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171537 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize/LoopVectorize.cpp')
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp
index 4e508988e3..5e2d7971f8 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -1986,7 +1986,6 @@ LoopVectorizationLegality::isReductionInstr(Instruction *I,
// possibly.
return true;
case Instruction::Add:
- case Instruction::Sub:
return Kind == IntegerAdd;
case Instruction::Mul:
return Kind == IntegerMult;