diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 3733b6a7769..2619047cb30 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -2285,7 +2285,8 @@ CastInst *CastInst::CreatePointerCast(Value *S, const Type *Ty, CastInst *CastInst::CreateIntegerCast(Value *C, const Type *Ty, bool isSigned, const Twine &Name, Instruction *InsertBefore) { - assert(C->getType()->isInteger() && Ty->isInteger() && "Invalid cast"); + assert(C->getType()->isIntOrIntVector() && Ty->isIntOrIntVector() && + "Invalid integer cast"); unsigned SrcBits = C->getType()->getScalarSizeInBits(); unsigned DstBits = Ty->getScalarSizeInBits(); Instruction::CastOps opcode =