[llvm-commits] [llvm] r80050 - /llvm/trunk/lib/VMCore/Instructions.cpp
Dan Gohman
gohman at apple.com
Tue Aug 25 16:27:45 PDT 2009
Author: djg
Date: Tue Aug 25 18:27:45 2009
New Revision: 80050
URL: http://llvm.org/viewvc/llvm-project?rev=80050&view=rev
Log:
Fix the InsertAtEnd form of ShuffleVectorInst constructor to use
the correct type.
Modified:
llvm/trunk/lib/VMCore/Instructions.cpp
Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=80050&r1=80049&r2=80050&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Tue Aug 25 18:27:45 2009
@@ -1272,10 +1272,12 @@
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!");
More information about the llvm-commits
mailing list