From 28691400dd5305eb70f6c74cdb2f9ff5d86c1172 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 23 Dec 2012 13:21:41 +0000 Subject: [PATCH] LoopVectorize: Fix accidentaly inverted condition. llvm-svn: 171001 --- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index ddb7f2607e57..1d78fac500da 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -2181,7 +2181,7 @@ LoopVectorizationCostModel::getInstructionCost(Instruction *I, unsigned VF) { // elements, times the vector width. unsigned Cost = 0; - if (RetTy->isVoidTy() || VF != 1) { + if (!RetTy->isVoidTy() && VF != 1) { unsigned InsCost = VTTI->getVectorInstrCost(Instruction::InsertElement, VectorTy); unsigned ExtCost = VTTI->getVectorInstrCost(Instruction::ExtractElement,