[llvm-branch-commits] [lld] [llvm] [RFC][AMDGPU][lld] Add object linking support (PR #206787)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jun 30 11:46:58 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 176529 tests passed
* 3561 tests skipped
* 3 tests failed

## Failed Tests
(click on a test name to see its output)

### lld
<details>
<summary>lld.ELF/amdgpu-lds-link-time-ir-instructions.s</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 20
split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-lds-link-time-ir-instructions.s /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-ir-instructions.s.tmp
# executed command: split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-lds-link-time-ir-instructions.s /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-ir-instructions.s.tmp
# note: command had no output on stdout or stderr
# RUN: at line 21
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-ir-instructions.s.tmp/tu1.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-ir-instructions.s.tmp/tu1.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-ir-instructions.s.tmp/tu1.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-ir-instructions.s.tmp/tu1.o
# note: command had no output on stdout or stderr
# RUN: at line 22
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-ir-instructions.s.tmp/tu2.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-ir-instructions.s.tmp/tu2.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-ir-instructions.s.tmp/tu2.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-ir-instructions.s.tmp/tu2.o
# note: command had no output on stdout or stderr
# RUN: at line 25
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump -d -r /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-ir-instructions.s.tmp/tu1.o | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-lds-link-time-ir-instructions.s --check-prefix=PRE1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump -d -r /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-ir-instructions.s.tmp/tu1.o
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-lds-link-time-ir-instructions.s --check-prefix=PRE1
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-lds-link-time-ir-instructions.s:40:9: error: PRE1: expected string not found in input
# | # PRE1: .long 0x9780ff00
# |         ^
# | <stdin>:7:29: note: scanning from here
# | 0000000000000000 <kernel_a>:
# |                             ^
# | <stdin>:11:44: note: possible intended match here
# |  s_lshl2_add_u32 s0, s0, lit(0x0) // 000000000010: 9780FF00 00000000
# |                                            ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-lds-link-time-ir-instructions.s
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1:  
# |             2: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-ir-instructions.s.tmp/tu1.o: file format elf64-amdgpu 
# |             3:  .amdgcn_target "amdgcn-amd-amdhsa-unknown-gfx900" 
# |             4:  
# |             5: Disassembly of section .text: 
# |             6:  
# |             7: 0000000000000000 <kernel_a>: 
# | check:40'0                                {   search range start (exclusive)
# | check:40'1                                    error: no match found in search range
# |             8:  s_load_dword s0, s[8:9], 0x0 // 000000000000: C0020004 00000000 
# |             9:  v_mov_b32_e32 v0, 42 // 000000000008: 7E0002AA 
# |            10:  s_waitcnt lgkmcnt(0) // 00000000000C: BF8CC07F 
# |            11:  s_lshl2_add_u32 s0, s0, lit(0x0) // 000000000010: 9780FF00 00000000 
# | check:40'2                                                ?                           possible intended match
# |            12:  0000000000000014: R_AMDGPU_ABS32_LO __lds_shared 
# |            13:  v_mov_b32_e32 v1, s0 // 000000000018: 7E020200 
# |            14:  ds_write_b32 v1, v0 // 00000000001C: D81A0000 00000001 
# |            15:  s_endpgm // 000000000024: BF810000 
# | check:40'3                                         } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>lld.ELF/amdgpu-lds-link-time-named-barrier.s</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 12
split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-lds-link-time-named-barrier.s /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp
# executed command: split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-lds-link-time-named-barrier.s /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp
# note: command had no output on stdout or stderr
# RUN: at line 13
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx1250 -filetype=obj /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/a.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/a.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx1250 -filetype=obj /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/a.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/a.o
# note: command had no output on stdout or stderr
# RUN: at line 14
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx1250 -filetype=obj /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/b.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/b.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx1250 -filetype=obj /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/b.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/b.o
# note: command had no output on stdout or stderr
# RUN: at line 15
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/a.o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/b.o -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/out
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/a.o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/b.o -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/out
# .---command stderr------------
# | ld.lld: warning: cannot find entry symbol _start; not setting start address
# `-----------------------------
# RUN: at line 19
llvm-objcopy --dump-section=.rodata=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/rodata /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/out
# executed command: llvm-objcopy --dump-section=.rodata=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/rodata /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/out
# note: command had no output on stdout or stderr
# RUN: at line 20
python3 -c "                                              import struct, sys;                                      data = open(sys.argv[1], 'rb').read();                  rsrc3_a = struct.unpack_from('<I', data, 44)[0];        rsrc3_b = struct.unpack_from('<I', data, 108)[0];       nbc_a = (rsrc3_a >> 14) & 7;                            nbc_b = (rsrc3_b >> 14) & 7;                            print(f'NAMED_BAR_CNT_A={nbc_a}');                      print(f'NAMED_BAR_CNT_B={nbc_b}');                    " /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/rodata | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-lds-link-time-named-barrier.s
# executed command: python3 -c '                                              import struct, sys;                                      data = open(sys.argv[1], '"'"'rb'"'"').read();                  rsrc3_a = struct.unpack_from('"'"'<I'"'"', data, 44)[0];        rsrc3_b = struct.unpack_from('"'"'<I'"'"', data, 108)[0];       nbc_a = (rsrc3_a >> 14) & 7;                            nbc_b = (rsrc3_b >> 14) & 7;                            print(f'"'"'NAMED_BAR_CNT_A={nbc_a}'"'"');                      print(f'"'"'NAMED_BAR_CNT_B={nbc_b}'"'"');                    ' /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-lds-link-time-named-barrier.s.tmp/rodata
# .---command stderr------------
# |   File "<string>", line 1
# |     import struct, sys;                                      data = open(sys.argv[1], 'rb').read();                  rsrc3_a = struct.unpack_from('<I', data, 44)[0];        rsrc3_b = struct.unpack_from('<I', data, 108)[0];       nbc_a = (rsrc3_a >> 14) & 7;                            nbc_b = (rsrc3_b >> 14) & 7;                            print(f'NAMED_BAR_CNT_A={nbc_a}');                      print(f'NAMED_BAR_CNT_B={nbc_b}');                    
# | IndentationError: unexpected indent
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-lds-link-time-named-barrier.s
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-lds-link-time-named-barrier.s
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>
<details>
<summary>lld.ELF/amdgpu-named-barrier-cross-tu.s</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 16
split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-named-barrier-cross-tu.s /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp
# executed command: split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-named-barrier-cross-tu.s /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp
# note: command had no output on stdout or stderr
# RUN: at line 17
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx1250 -filetype=obj /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/a.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/a.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx1250 -filetype=obj /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/a.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/a.o
# note: command had no output on stdout or stderr
# RUN: at line 18
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx1250 -filetype=obj /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/b.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/b.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx1250 -filetype=obj /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/b.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/b.o
# note: command had no output on stdout or stderr
# RUN: at line 19
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/a.o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/b.o -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/out
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/a.o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/b.o -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/out
# .---command stderr------------
# | ld.lld: warning: cannot find entry symbol _start; not setting start address
# `-----------------------------
# RUN: at line 24
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-nm --format=posix /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/out | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-named-barrier-cross-tu.s --check-prefix=SYMS
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-nm --format=posix /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/out
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-named-barrier-cross-tu.s --check-prefix=SYMS
# note: command had no output on stdout or stderr
# RUN: at line 27
llvm-objcopy --dump-section=.rodata=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/rodata /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/out
# executed command: llvm-objcopy --dump-section=.rodata=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/rodata /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/out
# note: command had no output on stdout or stderr
# RUN: at line 28
python3 -c "                                              import struct, sys;                                      data = open(sys.argv[1], 'rb').read();                  rsrc3 = struct.unpack_from('<I', data, 44)[0];          nbc = (rsrc3 >> 14) & 7;                                print(f'NAMED_BAR_CNT={nbc}');                        " /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/rodata | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-named-barrier-cross-tu.s --check-prefix=KD
# executed command: python3 -c '                                              import struct, sys;                                      data = open(sys.argv[1], '"'"'rb'"'"').read();                  rsrc3 = struct.unpack_from('"'"'<I'"'"', data, 44)[0];          nbc = (rsrc3 >> 14) & 7;                                print(f'"'"'NAMED_BAR_CNT={nbc}'"'"');                        ' /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/amdgpu-named-barrier-cross-tu.s.tmp/rodata
# .---command stderr------------
# |   File "<string>", line 1
# |     import struct, sys;                                      data = open(sys.argv[1], 'rb').read();                  rsrc3 = struct.unpack_from('<I', data, 44)[0];          nbc = (rsrc3 >> 14) & 7;                                print(f'NAMED_BAR_CNT={nbc}');                        
# | IndentationError: unexpected indent
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-named-barrier-cross-tu.s --check-prefix=KD
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/amdgpu-named-barrier-cross-tu.s --check-prefix=KD
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/206787


More information about the llvm-branch-commits mailing list