Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/PowerPC/dsolocal-static.ll
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

122 lines
3.7 KiB
LLVM

; RUN: llc -mtriple=ppc64le -relocation-model=static < %s | FileCheck %s
@default = global i32 55
define dso_local ptr @get_default_global() {
; CHECK-LABEL: get_default_global:
; CHECK: addis 3, 2, .LC{{.*}}@toc@ha
; CHECK-NEXT: ld 3, .LC{{.*}}@toc@l(3)
; CHECK-NEXT: blr
ret ptr @default
}
@local_global = dso_local global i32 55
define dso_local ptr @get_local_global() {
; CHECK-LABEL: get_local_global:
; CHECK: addis 3, 2, local_global@toc@ha
; CHECK-NEXT: addi 3, 3, local_global@toc@l
; CHECK-NEXT: blr
ret ptr @local_global
}
@preemptable_global = dso_preemptable global i32 42
define dso_local ptr @get_preemptable_global() {
; CHECK-LABEL: get_preemptable_global:
; CHECK: addis 3, 2, .LC{{.*}}@toc@ha
; CHECK-NEXT: ld 3, .LC{{.*}}@toc@l(3)
; CHECK-NEXT: blr
ret ptr @preemptable_global
}
@external_default_global = external global i32
define dso_local ptr @get_external_default_global() {
; CHECK-LABEL: get_external_default_global:
; CHECK: addis 3, 2, .LC{{.*}}@toc@ha
; CHECK-NEXT: ld 3, .LC{{.*}}@toc@l(3)
; CHECK-NEXT: blr
ret ptr @external_default_global
}
@external_local_global = external dso_local global i32
define dso_local ptr @get_external_local_global() {
; CHECK-LABEL: get_external_local_global:
; CHECK: addis 3, 2, external_local_global@toc@ha
; CHECK-NEXT: addi 3, 3, external_local_global@toc@l
; CHECK-NEXT: blr
ret ptr @external_local_global
}
@external_preemptable_global = external dso_preemptable global i32
define dso_local ptr @get_external_preemptable_global() {
; CHECK-LABEL: get_external_preemptable_global:
; CHECK: addis 3, 2, .LC{{.*}}@toc@ha
; CHECK-NEXT: ld 3, .LC{{.*}}@toc@l(3)
; CHECK-NEXT: blr
ret ptr @external_preemptable_global
}
; functions
define signext i32 @default_function(i32 %i) {
ret i32 %i
}
define dso_local signext i32 @default_function_caller(i32 %i) {
; CHECK-LABEL: default_function_caller:
; CHECK: bl default_function
; CHECK-NEXT: nop
%call = notail call signext i32 @default_function(i32 signext %i)
ret i32 %call
}
define dso_local signext i32 @local_function(i32 %i) {
ret i32 %i
}
define dso_local signext i32 @local_function_caller(i32 %i) {
; CHECK-LABEL: local_function_caller:
; CHECK: bl local_function
; CHECK-NOT: nop
; CHECK: blr
%call = notail call signext i32 @local_function(i32 signext %i)
ret i32 %call
}
define dso_preemptable signext i32 @preemptable_function(i32 %i) {
ret i32 %i
}
define dso_local signext i32 @preemptable_function_caller(i32 %i) {
; CHECK-LABEL: preemptable_function_caller:
; CHECK: bl preemptable_function
; CHECK-NEXT: nop
%call = notail call signext i32 @preemptable_function(i32 signext %i)
ret i32 %call
}
declare i32 @external_default_function(i32 %i)
define dso_local i32 @external_default_function_caller(i32 %i) {
; CHECK-LABEL: external_default_function_caller:
; CHECK: bl external_default_function
; CHECK-NEXT: nop
; CHECK: blr
%call = notail call signext i32 @external_default_function(i32 signext %i)
ret i32 %call
}
declare dso_local i32 @external_local_function(i32 %i)
define dso_local i32 @external_local_function_caller(i32 %i) {
; CHECK-LABEL: external_local_function_caller:
; CHECK: bl external_local_function
; CHECK-NEXT: nop
%call = notail call signext i32 @external_local_function(i32 signext %i)
ret i32 %call
}
declare dso_preemptable i32 @external_preemptable_function(i32 %i)
define dso_local i32 @external_preemptable_function_caller(i32 %i) {
; CHECK-LABEL: external_preemptable_function_caller:
; CHECK: bl external_preemptable_function
; CHECK-NEXT: nop
%call = notail call signext i32 @external_preemptable_function(i32 signext %i)
ret i32 %call
}