Files
TheRock/compiler/amd-llvm/lld/test/MachO/compression-order-sections.s
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

113 lines
3.4 KiB
ArmAsm

# REQUIRES: aarch64
# RUN: rm -rf %t && split-file %s %t
# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/a.s -o %t/a.o
# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/b.s -o %t/b.o
## Wildcard glob: all sections go to a single group
# RUN: %lld -arch arm64 -e _main -o %t/a.out %t/a.o %t/b.o \
# RUN: --bp-compression-sort-section="*" \
# RUN: --verbose-bp-section-orderer 2>&1 | FileCheck %s --check-prefix=WILDCARD
# WILDCARD: Sections for compression: 7
# WILDCARD: Compression groups: 1
# WILDCARD: *: 7 sections
## Two globs: sections are grouped by the winning glob
# RUN: %lld -arch arm64 -e _main -o %t/a.out %t/a.o %t/b.o \
# RUN: --bp-compression-sort-section="__DATA*" \
# RUN: --bp-compression-sort-section="__TEXT*" \
# RUN: --verbose-bp-section-orderer 2>&1 | FileCheck %s --check-prefix=TWO-GLOBS
## Deprecated --bp-compression-sort=both still works
# RUN: %lld -arch arm64 -e _main -o %t/a.out %t/a.o %t/b.o \
# RUN: --bp-compression-sort=both \
# RUN: --verbose-bp-section-orderer 2>&1 | FileCheck %s --check-prefix=LEGACY-BOTH
## Deprecated function/data modes still use the legacy buckets.
# RUN: %lld -arch arm64 -e _main -o %t/a.out %t/a.o %t/b.o \
# RUN: --bp-compression-sort=function \
# RUN: --verbose-bp-section-orderer 2>&1 | FileCheck %s --check-prefix=LEGACY-FUNCTION
# RUN: %lld -arch arm64 -e _main -o %t/a.out %t/a.o %t/b.o \
# RUN: --bp-compression-sort=data \
# RUN: --verbose-bp-section-orderer 2>&1 | FileCheck %s --check-prefix=LEGACY-DATA
# TWO-GLOBS: Sections for compression: 7
# TWO-GLOBS: Compression groups: 2
# TWO-GLOBS: __DATA*: 6 sections
# TWO-GLOBS: __TEXT*: 1 sections
# LEGACY-BOTH: Sections for compression: 7
# LEGACY-BOTH: Compression groups: 2
# LEGACY-BOTH: legacy:function: 1 sections
# LEGACY-BOTH: legacy:data: 6 sections
# LEGACY-FUNCTION: Sections for compression: 1
# LEGACY-FUNCTION: Compression groups: 1
# LEGACY-FUNCTION: legacy:function: 1 sections
# LEGACY-DATA: Sections for compression: 6
# LEGACY-DATA: Compression groups: 1
# LEGACY-DATA: legacy:data: 6 sections
## Single glob matching only TEXT
# RUN: %lld -arch arm64 -e _main -o %t/a.out %t/a.o %t/b.o \
# RUN: --bp-compression-sort-section="__TEXT*" \
# RUN: --verbose-bp-section-orderer 2>&1 | FileCheck %s --check-prefix=TEXT
# TEXT: Sections for compression: 1
# TEXT: Compression groups: 1
# TEXT: __TEXT*: 1 sections
## Exact section name glob
# RUN: %lld -arch arm64 -e _main -o %t/a.out %t/a.o %t/b.o \
# RUN: --bp-compression-sort-section="__DATA__custom" \
# RUN: --verbose-bp-section-orderer 2>&1 | FileCheck %s --check-prefix=DATA
# DATA: Sections for compression: 2
# DATA: Compression groups: 1
# DATA: __DATA__custom: 2 sections
## Match priority: explicit match_priority wins
# RUN: %lld -arch arm64 -e _main -o %t/match.out %t/a.o %t/b.o \
# RUN: --bp-compression-sort-section="__DATA*" \
# RUN: --bp-compression-sort-section="__DATA__custom=0=1" \
# RUN: --verbose-bp-section-orderer 2>&1 | FileCheck %s --check-prefix=MATCH
# MATCH: Compression groups: 2
# MATCH: __DATA*: 4 sections
# MATCH: __DATA__custom: 2 sections
#--- a.s
.text
.globl _main
_main:
ret
.data
data_01:
.ascii "data_01"
data_02:
.ascii "data_02"
data_03:
.ascii "data_03"
.section __DATA,__custom
custom_06:
.ascii "custom_06"
custom_07:
.ascii "custom_07"
.bss
bss0:
.zero 10
.subsections_via_symbols
#--- b.s
.data
data_11:
.ascii "data_11"
.subsections_via_symbols