[llvm] Add llvm-extract-bundle-entry to extend llvm-objcopy (PR #169386)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 12 00:50:12 PST 2026
================
@@ -0,0 +1,97 @@
+## Test llvm-extract-bundle-entry.
+
+# RUN: yaml2obj %s -o %t.elf
+# RUN: llvm-extract-bundle-entry file://%t.elf#offset=8192\&size=4048
+# RUN: llvm-objdump -d %t.elf-offset8192-size4048.co | FileCheck %s --check-prefix=EXTRACT_BUNDLE_ENTRY
+# EXTRACT_BUNDLE_ENTRY: s_load_dword s7, s[4:5], 0x24 // 000000001900: C00201C2 00000024
+# EXTRACT_BUNDLE_ENTRY-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x0 // 000000001908: C00A0002 00000000
+# EXTRACT_BUNDLE_ENTRY-NEXT: v_mov_b32_e32 v1, 0 // 000000001910: 7E020280
+# EXTRACT_BUNDLE_ENTRY-NEXT: s_waitcnt lgkmcnt(0) // 000000001914: BF8CC07F
+# EXTRACT_BUNDLE_ENTRY-NEXT: s_and_b32 s4, s7, 0xffff // 000000001918: 8604FF07 0000FFFF
+# EXTRACT_BUNDLE_ENTRY-NEXT: s_mul_i32 s6, s6, s4 // 000000001920: 92060406
+# EXTRACT_BUNDLE_ENTRY-NEXT: v_add_u32_e32 v0, s6, v0 // 000000001924: 68000006
+# EXTRACT_BUNDLE_ENTRY-NEXT: v_lshlrev_b64 v[0:1], 2, v[0:1] // 000000001928: D28F0000 00020082
+# EXTRACT_BUNDLE_ENTRY-NEXT: v_mov_b32_e32 v3, s3 // 000000001930: 7E060203
+# EXTRACT_BUNDLE_ENTRY-NEXT: v_add_co_u32_e32 v2, vcc, s2, v0 // 000000001934: 32040002
+# EXTRACT_BUNDLE_ENTRY-NEXT: v_addc_co_u32_e32 v3, vcc, v3, v1, vcc // 000000001938: 38060303
+# EXTRACT_BUNDLE_ENTRY-NEXT: global_load_dword v2, v[2:3], off // 00000000193C: DC508000 027F0002
+# EXTRACT_BUNDLE_ENTRY-NEXT: v_mov_b32_e32 v3, s1 // 000000001944: 7E060201
+# EXTRACT_BUNDLE_ENTRY-NEXT: v_add_co_u32_e32 v0, vcc, s0, v0 // 000000001948: 32000000
+# EXTRACT_BUNDLE_ENTRY-NEXT: v_addc_co_u32_e32 v1, vcc, v3, v1, vcc // 00000000194C: 38020303
+# EXTRACT_BUNDLE_ENTRY-NEXT: global_load_dword v3, v[0:1], off // 000000001950: DC508000 037F0000
+# EXTRACT_BUNDLE_ENTRY-NEXT: s_waitcnt vmcnt(0) // 000000001958: BF8C0F70
+# EXTRACT_BUNDLE_ENTRY-NEXT: v_add_u32_e32 v2, v3, v2 // 00000000195C: 68040503
+# EXTRACT_BUNDLE_ENTRY-NEXT: global_store_dword v[0:1], v2, off // 000000001960: DC708000 007F0200
+# EXTRACT_BUNDLE_ENTRY-NEXT: s_endpgm // 000000001968: BF810000
+
+# RUN: llvm-extract-bundle-entry -help 2>&1 | \
----------------
jh7370 wrote:
I'm somewhat surprised `-help` here works. I suspect it's seeing it as `-h=elp` or `-h`, `-e,` `-l`, `-p`. The long-form is currently `--Help` (but see my comment re. the spelling), with two dashes and the short form `-h`. You should also have a test for both forms.
https://github.com/llvm/llvm-project/pull/169386
More information about the llvm-commits
mailing list