From 638d853ef028b446715ac4e0b1a059d68769b465 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 25 Aug 2009 23:27:45 +0000 Subject: [PATCH] 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 --- lib/VMCore/Instructions.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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!"); -- 2.34.1