mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-06 02:29:51 +00: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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269972 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fa30381518
commit
c8ee6f35bc
@ -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");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user