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

90 lines
3.0 KiB
LLVM

; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr10 -ppc-asm-full-reg-names \
; RUN: < %s | FileCheck %s --check-prefix=CHECK-S
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names \
; RUN: --filetype=obj < %s | llvm-objdump --no-show-raw-insn --mcpu=pwr10 -dr - \
; RUN: | FileCheck %s --check-prefix=CHECK-O
; These test cases are to ensure that when using pc relative memory operations
; ABI correct code and relocations are produced for the Local Exec TLS Model.
@x = dso_local thread_local global i32 0, align 4
@y = dso_local thread_local global [5 x i32] [i32 0, i32 0, i32 0, i32 0, i32 0], align 4
define dso_local ptr @LocalExecAddressLoad() {
; CHECK-S-LABEL: LocalExecAddressLoad:
; CHECK-S: # %bb.0: # %entry
; CHECK-S-NEXT: paddi r3, r13, x@TPREL
; CHECK-S-NEXT: blr
; CHECK-O-LABEL: <LocalExecAddressLoad>:
; CHECK-O: 0: paddi 3, 13, 0
; CHECK-O-NEXT: 0000000000000000: R_PPC64_TPREL34 x
; CHECK-O-NEXT: 8: blr
entry:
ret ptr @x
}
define dso_local i32 @LocalExecValueLoad() {
; CHECK-S-LABEL: LocalExecValueLoad:
; CHECK-S: # %bb.0: # %entry
; CHECK-S-NEXT: paddi r3, r13, x@TPREL
; CHECK-S-NEXT: lwz r3, 0(r3)
; CHECK-S-NEXT: blr
; CHECK-O-LABEL: <LocalExecValueLoad>:
; CHECK-O: 20: paddi 3, 13, 0
; CHECK-O-NEXT: 0000000000000020: R_PPC64_TPREL34 x
; CHECK-O-NEXT: 28: lwz 3, 0(3)
; CHECK-O-NEXT: 2c: blr
entry:
%0 = load i32, ptr @x, align 4
ret i32 %0
}
define dso_local void @LocalExecValueStore(i32 %in) {
; CHECK-S-LABEL: LocalExecValueStore:
; CHECK-S: # %bb.0: # %entry
; CHECK-S-NEXT: paddi r4, r13, x@TPREL
; CHECK-S-NEXT: stw r3, 0(r4)
; CHECK-S-NEXT: blr
; CHECK-O-LABEL: <LocalExecValueStore>:
; CHECK-O: 40: paddi 4, 13, 0
; CHECK-O-NEXT: 0000000000000040: R_PPC64_TPREL34 x
; CHECK-O-NEXT: 48: stw 3, 0(4)
; CHECK-O-NEXT: 4c: blr
entry:
store i32 %in, ptr @x, align 4
ret void
}
define dso_local i32 @LocalExecValueLoadOffset() {
; CHECK-S-LABEL: LocalExecValueLoadOffset:
; CHECK-S: # %bb.0: # %entry
; CHECK-S-NEXT: paddi r3, r13, y@TPREL
; CHECK-S-NEXT: lwz r3, 12(r3)
; CHECK-S-NEXT: blr
; CHECK-O-LABEL: <LocalExecValueLoadOffset>:
; CHECK-O: 60: paddi 3, 13, 0
; CHECK-O-NEXT: 0000000000000060: R_PPC64_TPREL34 y
; CHECK-O-NEXT: 68: lwz 3, 12(3)
; CHECK-O-NEXT: 6c: blr
entry:
%0 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @y, i64 0, i64 3), align 4
ret i32 %0
}
define dso_local ptr @LocalExecValueLoadOffsetNoLoad() {
; CHECK-S-LABEL: LocalExecValueLoadOffsetNoLoad:
; CHECK-S: # %bb.0: # %entry
; CHECK-S-NEXT: paddi r3, r13, y@TPREL
; CHECK-S-NEXT: addi r3, r3, 12
; CHECK-S-NEXT: blr
; CHECK-O-LABEL: <LocalExecValueLoadOffsetNoLoad>:
; CHECK-O: 80: paddi 3, 13, 0
; CHECK-O-NEXT: 0000000000000080: R_PPC64_TPREL34 y
; CHECK-O-NEXT: 88: addi 3, 3, 12
; CHECK-O-NEXT: 8c: blr
entry:
ret ptr getelementptr inbounds ([5 x i32], ptr @y, i64 0, i64 3)
}