Files
TheRock/compiler/amd-llvm/lld/test/MachO/icf-safe-missing-addrsig.s
T
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
2.9 KiB
ArmAsm

# REQUIRES: aarch64
# RUN: rm -rf %t && split-file %s %t
# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/with-addrsig.s -o %t/with-addrsig.o
# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/without-addrsig.s -o %t/without-addrsig.o
# RUN: %lld -arch arm64 -lSystem --icf=safe -dylib -map %t/with-addrsig-safe.map -o %t/with-addrsig.dylib %t/with-addrsig.o
# RUN: %lld -arch arm64 -lSystem --icf=safe -dylib -map %t/without-addrsig-safe.map -o %t/without-addrsig.dylib %t/without-addrsig.o
# RUN: %lld -arch arm64 -lSystem --icf=safe_thunks -dylib -map %t/with-addrsig-safe-thunks.map -o %t/with-addrsig-thunks.dylib %t/with-addrsig.o
# RUN: %lld -arch arm64 -lSystem --icf=safe_thunks -dylib -map %t/without-addrsig-safe-thunks.map -o %t/without-addrsig-thunks.dylib %t/without-addrsig.o
# RUN: FileCheck %s --check-prefix=ADDRSIG-SAFE < %t/with-addrsig-safe.map
# RUN: FileCheck %s --check-prefix=NO-ADDRSIG-SAFE < %t/without-addrsig-safe.map
# RUN: FileCheck %s --check-prefix=ADDRSIG-SAFE-THUNKS < %t/with-addrsig-safe-thunks.map
# RUN: FileCheck %s --check-prefix=NO-ADDRSIG-SAFE-THUNKS < %t/without-addrsig-safe-thunks.map
## Input has addrsig section: _g1 and _g2 are address-significant, so _g2 is
## thunk-folded in safe_thunks ICF and remains untouched in safe ICF.
## _f2 is always body-folded into _f1 regardless of ICF level.
# ADDRSIG-SAFE: 0x00000008 [ 2] _f1
# ADDRSIG-SAFE-NEXT: 0x00000000 [ 2] _f2
# ADDRSIG-SAFE: 0x00000008 [ 2] _g1
# ADDRSIG-SAFE-NEXT: 0x00000008 [ 2] _g2
# ADDRSIG-SAFE-THUNKS: 0x00000008 [ 2] _f1
# ADDRSIG-SAFE-THUNKS-NEXT: 0x00000000 [ 2] _f2
# ADDRSIG-SAFE-THUNKS: 0x00000008 [ 2] _g1
# ADDRSIG-SAFE-THUNKS: 0x00000004 [ 2] _g2
## Input does not have addrsig section: everything is address-significant, so
## no folding happened in safe ICF, and _f2, _g2 are thunk-folded into _f1, _g1
## respectively.
# NO-ADDRSIG-SAFE: 0x00000008 [ 2] _f1
# NO-ADDRSIG-SAFE-NEXT: 0x00000008 [ 2] _f2
# NO-ADDRSIG-SAFE-NEXT: 0x00000008 [ 2] _g1
# NO-ADDRSIG-SAFE-NEXT: 0x00000008 [ 2] _g2
# NO-ADDRSIG-SAFE-THUNKS: 0x00000008 [ 2] _f1
# NO-ADDRSIG-SAFE-THUNKS-NEXT: 0x00000008 [ 2] _g1
# NO-ADDRSIG-SAFE-THUNKS: 0x00000004 [ 2] _g2
# NO-ADDRSIG-SAFE-THUNKS-NEXT: 0x00000004 [ 2] _f2
#--- with-addrsig.s
.subsections_via_symbols
.text
.p2align 2
.globl _f1
_f1:
mov w0, #0
ret
.globl _f2
_f2:
mov w0, #0
ret
.globl _g1
_g1:
mov w0, #1
ret
.globl _g2
_g2:
mov w0, #1
ret
.globl _call_all
_call_all:
bl _f1
bl _f2
bl _g1
bl _g2
ret
.addrsig
.addrsig_sym _call_all
.addrsig_sym _g1
.addrsig_sym _g2
#--- without-addrsig.s
.subsections_via_symbols
.text
.p2align 2
.globl _f1
_f1:
mov w0, #0
ret
.globl _f2
_f2:
mov w0, #0
ret
.globl _g1
_g1:
mov w0, #1
ret
.globl _g2
_g2:
mov w0, #1
ret
.globl _call_all
_call_all:
bl _f1
bl _f2
bl _g1
bl _g2
ret