https://gcc.gnu.org/g:0e3fb609b66fb099c10900076315a92e9236c33c

commit 0e3fb609b66fb099c10900076315a92e9236c33c
Author: Andrew Stubbs <[email protected]>
Date:   Tue Nov 24 17:41:19 2026 +0000

    amdgcn: OG16 fixups for mainline backports
    
    OG16 has SIMT, mainline does not.
    
    gcc/ChangeLog:
    
            * config/gcn/gcn.cc (move_callee_saved_registers_simt): Fix offset
            range comparison.
            * config/gcn/gcn.md (extendsidi2): Add simt_clobber.

Diff:
---
 gcc/config/gcn/gcn.cc | 2 +-
 gcc/config/gcn/gcn.md | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index 08e3ebe1758b..c35b71a10ee1 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -3437,7 +3437,7 @@ move_callee_saved_registers_simt (rtx sp, 
machine_function *offsets,
        offset += 4*64;
        raw_offset += 4*64;
 
-       if (offset > (TARGET_11BIT_GLOBAL_OFFSET ? 1<<11 : 1<<12))
+       if (offset >= (TARGET_11BIT_GLOBAL_OFFSET ? 1<<11 : 1<<12))
          {
            /* We ran out of bits in the offset field, so reset the base.
               Don't edit the SP itself, because the caller will do that.  */
diff --git a/gcc/config/gcn/gcn.md b/gcc/config/gcn/gcn.md
index 6c33821cebb8..c2bff59e003d 100644
--- a/gcc/config/gcn/gcn.md
+++ b/gcc/config/gcn/gcn.md
@@ -2030,7 +2030,8 @@
   {
     operands[3] = gcn_operand_part (DImode, operands[0], 0);
     operands[4] = gcn_operand_part (DImode, operands[0], 1);
-  })
+  }
+  [(set_attr "simt_clobber" "2")])
 
 ;; }}}
 ;; {{{ ALU: generic 128-bit binop

Reply via email to