Do not vectorize loops with subtraction reductions
authorPaul Redmond <paul.redmond@intel.com>
Fri, 4 Jan 2013 22:10:16 +0000 (22:10 +0000)
committerPaul Redmond <paul.redmond@intel.com>
Fri, 4 Jan 2013 22:10:16 +0000 (22:10 +0000)
commit5767d919569f7b4be51c0a13bff24f722625d9f3
treefdeba97aeb1434f7c6b6adcc693d69a129d2f627
parent8cab6edf4fa46d9bd06ff3ce0e1dd4557be58b65
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
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/gcc-examples.ll
test/Transforms/LoopVectorize/reduction.ll