diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-25 23:27:45 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-25 23:27:45 +0000 |
commit | e5af8cd13bde56cbad543a150e6e197e2edb9281 (patch) | |
tree | e3f9310457c9c4e276fb354b4b66bbb571f3f247 /llvm/lib/VMCore/Instructions.cpp | |
parent | ad1f0a1101f07112478d5bb6b55302579aac13d9 (diff) | |
download | bcm5719-llvm-e5af8cd13bde56cbad543a150e6e197e2edb9281.tar.gz bcm5719-llvm-e5af8cd13bde56cbad543a150e6e197e2edb9281.zip |
Fix the InsertAtEnd form of ShuffleVectorInst constructor to use
the correct type.
llvm-svn: 80050
Diffstat (limited to 'llvm/lib/VMCore/Instructions.cpp')
-rw-r--r-- | llvm/lib/VMCore/Instructions.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp index 80d5992295f..e4cf5f461aa 100644 --- a/llvm/lib/VMCore/Instructions.cpp +++ b/llvm/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<ShuffleVectorInst>::op_begin(this), - OperandTraits<ShuffleVectorInst>::operands(this), - InsertAtEnd) { +: Instruction(VectorType::get(cast<VectorType>(V1->getType())->getElementType(), + cast<VectorType>(Mask->getType())->getNumElements()), + ShuffleVector, + OperandTraits<ShuffleVectorInst>::op_begin(this), + OperandTraits<ShuffleVectorInst>::operands(this), + InsertAtEnd) { assert(isValidOperands(V1, V2, Mask) && "Invalid shuffle vector instruction operands!"); |