fix a buggy assertion, CreateIntegerCast should allow

integer vectors as well as just integers.

llvm-svn: 93126
This commit is contained in:
Chris Lattner 2010-01-10 20:21:42 +00:00
parent e056cea3a6
commit 5370ae7b70
1 changed files with 2 additions and 1 deletions

View File

@ -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 =