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

50 lines
1.1 KiB
LLVM

; RUN: llc -mtriple=arm64_32-apple-ios7.0 %s -o - | FileCheck %s
define void @pass_pointer(i64 %in) {
; CHECK-LABEL: pass_pointer:
; CHECK: mov w0, w0
; CHECK: bl _take_pointer
%in32 = trunc i64 %in to i32
%ptr = inttoptr i32 %in32 to ptr
call i64 @take_pointer(ptr %ptr)
ret void
}
define i64 @take_pointer(ptr %ptr) nounwind {
; CHECK-LABEL: take_pointer:
; CHECK-NEXT: %bb.0
; CHECK-NEXT: ret
%val = ptrtoint ptr %ptr to i32
%res = zext i32 %val to i64
ret i64 %res
}
define i32 @callee_ptr_stack_slot([8 x i64], ptr, i32 %val) {
; CHECK-LABEL: callee_ptr_stack_slot:
; CHECK: ldr w0, [sp, #4]
ret i32 %val
}
define void @caller_ptr_stack_slot(ptr %ptr) {
; CHECK-LABEL: caller_ptr_stack_slot:
; CHECK-DAG: mov [[VAL:w[0-9]]], #42
; CHECK: stp w0, [[VAL]], [sp]
call i32 @callee_ptr_stack_slot([8 x i64] undef, ptr %ptr, i32 42)
ret void
}
define ptr @return_ptr(i64 %in, i64 %r) {
; CHECK-LABEL: return_ptr:
; CHECK: sdiv x[[VAL64:[0-9]+]], x0, x1
; CHECK: mov w0, w[[VAL64]]
%sum = sdiv i64 %in, %r
%sum32 = trunc i64 %sum to i32
%res = inttoptr i32 %sum32 to ptr
ret ptr %res
}