diff --git a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp index 2a9393fc1595..effde63adc3d 100644 --- a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp +++ b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp @@ -3865,7 +3865,7 @@ bool AMDGPUAsmParser::validateMIMGDim(const MCInst &Inst) { if (DimIdx < 0) return true; - long Imm = Inst.getOperand(DimIdx).getImm(); + int64_t Imm = Inst.getOperand(DimIdx).getImm(); if (Imm < 0 || Imm >= 8) return false; diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp index cf311337d5eb..781f1097176d 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp @@ -177,7 +177,7 @@ encodeInstruction(const MCInst &MI, raw_ostream &OS, LowerCompactBranch(TmpInst); } - unsigned long N = Fixups.size(); + size_t N = Fixups.size(); uint32_t Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); // Check for unimplemented opcodes. diff --git a/llvm/lib/Target/PowerPC/PPCFastISel.cpp b/llvm/lib/Target/PowerPC/PPCFastISel.cpp index 7b1b9456080e..bfdbdcb0254e 100644 --- a/llvm/lib/Target/PowerPC/PPCFastISel.cpp +++ b/llvm/lib/Target/PowerPC/PPCFastISel.cpp @@ -74,7 +74,7 @@ struct Address { int FI; } Base; - long Offset; + int64_t Offset; // Innocuous defaults for our address. Address() @@ -338,7 +338,7 @@ bool PPCFastISel::PPCComputeAddress(const Value *Obj, Address &Addr) { break; case Instruction::GetElementPtr: { Address SavedAddr = Addr; - long TmpOffset = Addr.Offset; + int64_t TmpOffset = Addr.Offset; // Iterate through the GEP folding the constants into offsets where // we can. @@ -437,8 +437,7 @@ void PPCFastISel::PPCSimplifyAddress(Address &Addr, bool &UseOffset, if (!UseOffset) { IntegerType *OffsetTy = Type::getInt64Ty(*Context); - const ConstantInt *Offset = - ConstantInt::getSigned(OffsetTy, (int64_t)(Addr.Offset)); + const ConstantInt *Offset = ConstantInt::getSigned(OffsetTy, Addr.Offset); IndexReg = PPCMaterializeInt(Offset, MVT::i64); assert(IndexReg && "Unexpected error in PPCMaterializeInt!"); } diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 3c461a627d61..5feeb55e2ddd 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -15415,7 +15415,7 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N, MachineFunction &MF = DAG.getMachineFunction(); MachineMemOperand *BaseMMO = MF.getMachineMemOperand(LD->getMemOperand(), - -(long)MemVT.getStoreSize()+1, + -(int64_t)MemVT.getStoreSize()+1, 2*MemVT.getStoreSize()-1); // Create the new base load. diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td index f651b51d2684..88d3290f6c33 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td @@ -478,7 +478,7 @@ def HI16 : SDNodeXFormgetZExtValue(); + int64_t Val = N->getZExtValue(); return getI32Imm((Val - (signed short)Val) >> 16, SDLoc(N)); }]>; def MB : SDNodeXForm