mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-21 03:28:31 +00:00
Use type form of getIntPtrType.
This should be inconsequential and is work towards removing the default address space arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194347 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
30150a128c
commit
6d9e013447
@ -417,7 +417,7 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
|
||||
// - __tlv_bootstrap - used to make sure support exists
|
||||
// - spare pointer, used when mapped by the runtime
|
||||
// - pointer to mangled symbol above with initializer
|
||||
unsigned PtrSize = DL->getPointerSizeInBits()/8;
|
||||
unsigned PtrSize = DL->getPointerTypeSize(GV->getType());
|
||||
OutStreamer.EmitSymbolValue(GetExternalSymbolSymbol("_tlv_bootstrap"),
|
||||
PtrSize);
|
||||
OutStreamer.EmitIntValue(0, PtrSize);
|
||||
|
@ -485,11 +485,12 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
|
||||
break;
|
||||
}
|
||||
case Intrinsic::memset: {
|
||||
Type *IntPtr = TD.getIntPtrType(Context);
|
||||
Value *Op0 = CI->getArgOperand(0);
|
||||
Type *IntPtr = TD.getIntPtrType(Op0->getType());
|
||||
Value *Size = Builder.CreateIntCast(CI->getArgOperand(2), IntPtr,
|
||||
/* isSigned */ false);
|
||||
Value *Ops[3];
|
||||
Ops[0] = CI->getArgOperand(0);
|
||||
Ops[0] = Op0;
|
||||
// Extend the amount to i32.
|
||||
Ops[1] = Builder.CreateIntCast(CI->getArgOperand(1),
|
||||
Type::getInt32Ty(Context),
|
||||
|
@ -1047,7 +1047,7 @@ struct MemSetOpt : public LibCallOptimization {
|
||||
if (FT->getNumParams() != 3 || FT->getReturnType() != FT->getParamType(0) ||
|
||||
!FT->getParamType(0)->isPointerTy() ||
|
||||
!FT->getParamType(1)->isIntegerTy() ||
|
||||
FT->getParamType(2) != TD->getIntPtrType(*Context))
|
||||
FT->getParamType(2) != TD->getIntPtrType(FT->getParamType(0)))
|
||||
return 0;
|
||||
|
||||
// memset(p, v, n) -> llvm.memset(p, v, n, 1)
|
||||
|
Loading…
Reference in New Issue
Block a user