X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FVMCore%2FInstructions.cpp;h=800eb9cd1d866850315993ded9d946c57f5c26b6;hb=b83eb6447ba155342598f0fabe1f08f5baa9164a;hp=60fce0e4925704a63668894c6059f3462d817e9e;hpb=06a248c2385b997932689ed1312a1a6b1d814c3c;p=oota-llvm.git diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 60fce0e4925..800eb9cd1d8 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -513,7 +513,7 @@ void BranchInst::setSuccessorV(unsigned idx, BasicBlock *B) { static Value *getAISize(Value *Amt) { if (!Amt) - Amt = ConstantUInt::get(Type::UIntTy, 1); + Amt = ConstantInt::get(Type::UIntTy, 1); else { assert(!isa(Amt) && "Passed basic block into allocation size parameter! Ue other ctor"); @@ -546,8 +546,8 @@ AllocationInst::~AllocationInst() { } bool AllocationInst::isArrayAllocation() const { - if (ConstantUInt *CUI = dyn_cast(getOperand(0))) - return CUI->getValue() != 1; + if (ConstantInt *CUI = dyn_cast(getOperand(0))) + return CUI->getZExtValue() != 1; return true; } @@ -849,7 +849,7 @@ ExtractElementInst::ExtractElementInst(Value *Val, unsigned IndexV, Instruction *InsertBef) : Instruction(cast(Val->getType())->getElementType(), ExtractElement, Ops, 2, Name, InsertBef) { - Constant *Index = ConstantUInt::get(Type::UIntTy, IndexV); + Constant *Index = ConstantInt::get(Type::UIntTy, IndexV); assert(isValidOperands(Val, Index) && "Invalid extractelement instruction operands!"); Ops[0].init(Val, this); @@ -874,7 +874,7 @@ ExtractElementInst::ExtractElementInst(Value *Val, unsigned IndexV, BasicBlock *InsertAE) : Instruction(cast(Val->getType())->getElementType(), ExtractElement, Ops, 2, Name, InsertAE) { - Constant *Index = ConstantUInt::get(Type::UIntTy, IndexV); + Constant *Index = ConstantInt::get(Type::UIntTy, IndexV); assert(isValidOperands(Val, Index) && "Invalid extractelement instruction operands!"); @@ -915,7 +915,7 @@ InsertElementInst::InsertElementInst(Value *Vec, Value *Elt, unsigned IndexV, const std::string &Name, Instruction *InsertBef) : Instruction(Vec->getType(), InsertElement, Ops, 3, Name, InsertBef) { - Constant *Index = ConstantUInt::get(Type::UIntTy, IndexV); + Constant *Index = ConstantInt::get(Type::UIntTy, IndexV); assert(isValidOperands(Vec, Elt, Index) && "Invalid insertelement instruction operands!"); Ops[0].init(Vec, this); @@ -940,7 +940,7 @@ InsertElementInst::InsertElementInst(Value *Vec, Value *Elt, unsigned IndexV, const std::string &Name, BasicBlock *InsertAE) : Instruction(Vec->getType(), InsertElement, Ops, 3, Name, InsertAE) { - Constant *Index = ConstantUInt::get(Type::UIntTy, IndexV); + Constant *Index = ConstantInt::get(Type::UIntTy, IndexV); assert(isValidOperands(Vec, Elt, Index) && "Invalid insertelement instruction operands!");