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

111 lines
2.5 KiB
LLVM

; RUN: llc < %s -tailcallopt -mtriple=i686-pc-linux-gnu -relocation-model=pic | FileCheck %s
; While many of these could be tail called, we don't do it because it forces
; early binding.
declare void @external()
define hidden void @tailcallee_hidden() {
entry:
ret void
}
define void @tailcall_hidden() {
entry:
tail call void @tailcallee_hidden()
ret void
}
; CHECK-LABEL: tailcall_hidden:
; CHECK: jmp tailcallee_hidden
define internal void @tailcallee_internal() {
entry:
ret void
}
define void @tailcall_internal() {
entry:
tail call void @tailcallee_internal()
ret void
}
; CHECK-LABEL: tailcall_internal:
; CHECK: jmp tailcallee_internal
define default void @tailcallee_default() {
entry:
ret void
}
define void @tailcall_default() {
entry:
tail call void @tailcallee_default()
ret void
}
; CHECK-LABEL: tailcall_default:
; CHECK: calll tailcallee_default@PLT
define void @tailcallee_default_implicit() {
entry:
ret void
}
define void @tailcall_default_implicit() {
entry:
tail call void @tailcallee_default_implicit()
ret void
}
; CHECK-LABEL: tailcall_default_implicit:
; CHECK: calll tailcallee_default_implicit@PLT
define void @tailcall_external() {
tail call void @external()
ret void
}
; CHECK-LABEL: tailcall_external:
; CHECK: calll external@PLT
define void @musttail_external() {
musttail call void @external()
ret void
}
; CHECK-LABEL: musttail_external:
; CHECK: movl external@GOT
; CHECK: jmpl
; This test uses guaranteed TCO so these will be tail calls, despite the early
; binding issues.
define protected fastcc i32 @tailcallee_protected_fastcc(i32 %a1, i32 %a2, i32 %a3, i32 %a4) {
entry:
ret i32 %a3
}
define fastcc i32 @tailcaller_protected_fastcc(i32 %in1, i32 %in2) {
entry:
%tmp11 = tail call fastcc i32 @tailcallee_protected_fastcc( i32 %in1, i32 %in2, i32 %in1, i32 %in2 ) ; <i32> [#uses=1]
ret i32 %tmp11
; CHECK-LABEL: tailcaller_protected_fastcc:
; CHECK: jmp tailcallee_protected_fastcc
}
define fastcc i32 @tailcallee_default_fastcc(i32 %a1, i32 %a2, i32 %a3, i32 %a4) {
entry:
ret i32 %a3
}
define fastcc i32 @tailcaller_default_fastcc(i32 %in1, i32 %in2) {
entry:
%tmp11 = tail call fastcc i32 @tailcallee_default_fastcc( i32 %in1, i32 %in2, i32 %in1, i32 %in2 ) ; <i32> [#uses=1]
ret i32 %tmp11
; CHECK-LABEL: tailcaller_default_fastcc:
; CHECK: movl tailcallee_default_fastcc@GOT
; CHECK: jmpl
}
define i32 @tailcall_indirect(ptr %fp) {
%rv = tail call i32 () %fp()
ret i32 %rv
; CHECK-LABEL: tailcall_indirect:
; CHECK: jmpl {{.*}} # TAILCALL
}