Added support for the following definition of shufflevector

<result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask> 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58964 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mon P Wang
2008-11-10 04:46:22 +00:00
parent a64f463fb9
commit aeb06d2462
12 changed files with 315 additions and 77 deletions

View File

@ -1592,16 +1592,12 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
getValue(Record, OpNum, Vec1->getType(), Vec2))
return Error("Invalid SHUFFLEVEC record");
const Type *MaskTy =
VectorType::get(Type::Int32Ty,
cast<VectorType>(Vec1->getType())->getNumElements());
if (getValue(Record, OpNum, MaskTy, Mask))
if (getValueTypePair(Record, OpNum, NextValueNo, Mask))
return Error("Invalid SHUFFLEVEC record");
I = new ShuffleVectorInst(Vec1, Vec2, Mask);
break;
}
case bitc::FUNC_CODE_INST_CMP: { // CMP: [opty, opval, opval, pred]
// VFCmp/VICmp
// or old form of ICmp/FCmp returning bool