Index: llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp =================================================================== --- llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp +++ llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp @@ -96,7 +96,7 @@ switch ((unsigned)Fixup.getKind()) { case AMDGPU::fixup_si_sopp_br: { - int64_t BrImm = (Value - 4) / 4; + int64_t BrImm = ((int64_t)Value - 4) / 4; if (!isInt<16>(BrImm)) report_fatal_error("branch size exceeds simm16");