From 5767d919569f7b4be51c0a13bff24f722625d9f3 Mon Sep 17 00:00:00 2001 From: Paul Redmond Date: Fri, 4 Jan 2013 22:10:16 +0000 Subject: 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 | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/Transforms/Vectorize/LoopVectorize.cpp') 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; -- cgit v1.2.3-18-g5258