[llvm-commits] [llvm] r93126 - /llvm/trunk/lib/VMCore/Instructions.cpp
Chris Lattner
sabre at nondot.org
Sun Jan 10 12:21:43 PST 2010
Author: lattner
Date: Sun Jan 10 14:21:42 2010
New Revision: 93126
URL: http://llvm.org/viewvc/llvm-project?rev=93126&view=rev
Log:
fix a buggy assertion, CreateIntegerCast should allow
integer vectors as well as just integers.
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=93126&r1=93125&r2=93126&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Sun Jan 10 14:21:42 2010
@@ -2285,7 +2285,8 @@
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 =
More information about the llvm-commits
mailing list