Files
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

61 lines
2.5 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -relocation-model=pic -o - | FileCheck %s --check-prefix=CHECK-PIC
; RUN: llc < %s -mtriple=thumbv7-apple-ios -relocation-model=pic -mcpu=swift -mattr=+no-movt | FileCheck %s --check-prefix=CHECK-NOMOVT
%struct.anon = type { ptr }
%struct.one_atexit_routine = type { %struct.anon, i32, ptr }
@__dso_handle = external global { } ; <ptr> [#uses=1]
@llvm.used = appending global [1 x ptr] [ptr @atexit], section "llvm.metadata" ; <ptr> [#uses=0]
define i32 @atexit(ptr %func) {
; CHECK-PIC-LABEL: atexit:
; CHECK-PIC: @ %bb.0: @ %entry
; CHECK-PIC-NEXT: str lr, [sp, #-4]!
; CHECK-PIC-NEXT: sub sp, #12
; CHECK-PIC-NEXT: movw r1, :lower16:(L___dso_handle$non_lazy_ptr-(LPC0_0+4))
; CHECK-PIC-NEXT: movs r2, #0
; CHECK-PIC-NEXT: movt r1, :upper16:(L___dso_handle$non_lazy_ptr-(LPC0_0+4))
; CHECK-PIC-NEXT: strd r0, r2, [sp]
; CHECK-PIC-NEXT: LPC0_0:
; CHECK-PIC-NEXT: add r1, pc
; CHECK-PIC-NEXT: mov r0, sp
; CHECK-PIC-NEXT: ldr r1, [r1]
; CHECK-PIC-NEXT: bl _atexit_common
; CHECK-PIC-NEXT: add sp, #12
; CHECK-PIC-NEXT: ldr lr, [sp], #4
; CHECK-PIC-NEXT: bx lr
;
; CHECK-NOMOVT-LABEL: atexit:
; CHECK-NOMOVT: @ %bb.0: @ %entry
; CHECK-NOMOVT-NEXT: str lr, [sp, #-4]!
; CHECK-NOMOVT-NEXT: sub sp, #12
; CHECK-NOMOVT-NEXT: str r0, [sp]
; CHECK-NOMOVT-NEXT: movs r0, #0
; CHECK-NOMOVT-NEXT: str r0, [sp, #4]
; CHECK-NOMOVT-NEXT: ldr r0, LCPI0_0
; CHECK-NOMOVT-NEXT: LPC0_0:
; CHECK-NOMOVT-NEXT: add r0, pc
; CHECK-NOMOVT-NEXT: ldr r1, [r0]
; CHECK-NOMOVT-NEXT: mov r0, sp
; CHECK-NOMOVT-NEXT: bl _atexit_common
; CHECK-NOMOVT-NEXT: add sp, #12
; CHECK-NOMOVT-NEXT: ldr lr, [sp], #4
; CHECK-NOMOVT-NEXT: bx lr
; CHECK-NOMOVT-NEXT: .p2align 2
; CHECK-NOMOVT-NEXT: @ %bb.1:
; CHECK-NOMOVT-NEXT: .data_region
; CHECK-NOMOVT-NEXT: LCPI0_0:
; CHECK-NOMOVT-NEXT: .long L___dso_handle$non_lazy_ptr-(LPC0_0+4)
; CHECK-NOMOVT-NEXT: .end_data_region
entry:
%r = alloca %struct.one_atexit_routine, align 4 ; <ptr> [#uses=3]
%0 = getelementptr %struct.one_atexit_routine, ptr %r, i32 0, i32 0, i32 0 ; <ptr> [#uses=1]
store ptr %func, ptr %0, align 4
%1 = getelementptr %struct.one_atexit_routine, ptr %r, i32 0, i32 1 ; <ptr> [#uses=1]
store i32 0, ptr %1, align 4
%2 = call i32 @atexit_common(ptr %r, ptr @__dso_handle) nounwind ; <i32> [#uses=1]
ret i32 %2
}
declare i32 @atexit_common(ptr, ptr) nounwind