mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Second attempt at de-constifying LLVM Types in FunctionType::get(),
StructType::get() and TargetData::getIntPtrType(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134982 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1683,7 +1683,7 @@ static Instruction *ProcessUGT_ADDCST_ADD(ICmpInst &I, Value *A, Value *B,
|
||||
// result and the overflow bit.
|
||||
Module *M = I.getParent()->getParent()->getParent();
|
||||
|
||||
const Type *NewType = IntegerType::get(OrigAdd->getContext(), NewWidth);
|
||||
Type *NewType = IntegerType::get(OrigAdd->getContext(), NewWidth);
|
||||
Value *F = Intrinsic::getDeclaration(M, Intrinsic::sadd_with_overflow,
|
||||
&NewType, 1);
|
||||
|
||||
@@ -1725,7 +1725,7 @@ static Instruction *ProcessUAddIdiom(Instruction &I, Value *OrigAddV,
|
||||
Builder->SetInsertPoint(OrigAdd);
|
||||
|
||||
Module *M = I.getParent()->getParent()->getParent();
|
||||
const Type *Ty = LHS->getType();
|
||||
Type *Ty = LHS->getType();
|
||||
Value *F = Intrinsic::getDeclaration(M, Intrinsic::uadd_with_overflow, &Ty,1);
|
||||
CallInst *Call = Builder->CreateCall2(F, LHS, RHS, "uadd");
|
||||
Value *Add = Builder->CreateExtractValue(Call, 0);
|
||||
|
||||
Reference in New Issue
Block a user