From: Dan Gohman Date: Tue, 25 Aug 2009 23:27:45 +0000 (+0000) Subject: Fix the InsertAtEnd form of ShuffleVectorInst constructor to use X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=638d853ef028b446715ac4e0b1a059d68769b465;p=oota-llvm.git Fix the InsertAtEnd form of ShuffleVectorInst constructor to use the correct type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80050 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 80d5992295f..e4cf5f461aa 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -1272,10 +1272,12 @@ ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *V2, Value *Mask, ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *V2, Value *Mask, const Twine &Name, BasicBlock *InsertAtEnd) - : Instruction(V1->getType(), ShuffleVector, - OperandTraits::op_begin(this), - OperandTraits::operands(this), - InsertAtEnd) { +: Instruction(VectorType::get(cast(V1->getType())->getElementType(), + cast(Mask->getType())->getNumElements()), + ShuffleVector, + OperandTraits::op_begin(this), + OperandTraits::operands(this), + InsertAtEnd) { assert(isValidOperands(V1, V2, Mask) && "Invalid shuffle vector instruction operands!");