[PATCH] D20380: AMDGPU: Fix incorrect simm check

Jan Vesely via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 12:14:12 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL269972: AMDGPU: Fix incorrect simm check (authored by jvesely).

Changed prior to commit:
  http://reviews.llvm.org/D20380?vs=57654&id=57659#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D20380

Files:
  llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp

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");
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20380.57659.patch
Type: text/x-patch
Size: 550 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160518/36ab6ca8/attachment.bin>


More information about the llvm-commits mailing list