diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-10 20:21:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-10 20:21:42 +0000 |
commit | 859c372e04f053daa85812f8b790d2b0d1645fee (patch) | |
tree | cb1eda582c336a189be0a1bbd35eb27805302ec4 /lib/VMCore | |
parent | 0d75d874bfa3cee9fbe907d8aa0bab61556e3d0e (diff) |
fix a buggy assertion, CreateIntegerCast should allow
integer vectors as well as just integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93126 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 3733b6a776..2619047cb3 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 = |