1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

AMDGPU: Fix incorrect simm check

Use signed division otherwise all back jumps fail the check
Fixes regression introduced in r269951

Differential Revision: http://reviews.llvm.org/D20380

llvm-svn: 269972
This commit is contained in:
Jan Vesely 2016-05-18 19:07:58 +00:00
parent 72f4c82ed6
commit 0f6b39e33f

View File

@ -96,7 +96,7 @@ void AMDGPUAsmBackend::applyFixup(const MCFixup &Fixup, char *Data,
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");