From a1acf55738a9d6c0376c7d36b27897817685e157 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171001 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Vectorize/LoopVectorize.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index ddb7f2607e5..1d78fac500d 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/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,