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

69 lines
2.2 KiB
LLVM

; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -o - %s | FileCheck %s
; RUN: llc -global-isel -new-reg-bank-select -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -o - %s | FileCheck %s
; Test that a null check is not emitted for lowered addrspacecast
define void @flat_user(ptr %ptr) {
store i8 0, ptr %ptr
ret void
}
; CHECK-LABEL: {{^}}cast_alloca:
; CHECK: s_mov_b64 s[{{[0-9]+}}:[[HIREG:[0-9]+]]], src_private_base
; CHECK: v_mov_b32_e32 v1, s[[HIREG]]
; CHECK-NOT: v1
define void @cast_alloca() {
%alloca = alloca i8, addrspace(5)
%cast = addrspacecast ptr addrspace(5) %alloca to ptr
call void @flat_user(ptr %cast)
ret void
}
@lds = internal unnamed_addr addrspace(3) global i8 poison, align 4
; CHECK-LABEL: {{^}}cast_lds_gv:
; CHECK: s_mov_b64 s[{{[0-9]+}}:[[HIREG:[0-9]+]]], src_shared_base
; CHECK: v_mov_b32_e32 v0, 0
; CHECK: v_mov_b32_e32 v1, s[[HIREG]]
; CHECK-NOT: v1
define amdgpu_kernel void @cast_lds_gv() {
%cast = addrspacecast ptr addrspace(3) @lds to ptr
call void @flat_user(ptr %cast)
ret void
}
; CHECK-LABEL: {{^}}cast_constant_lds_neg1_gv:
; CHECK: v_mov_b32_e32 v0, 0
; CHECK: v_mov_b32_e32 v1, 0
define void @cast_constant_lds_neg1_gv() {
call void @flat_user(ptr addrspacecast (ptr addrspace(3) inttoptr (i32 -1 to ptr addrspace(3)) to ptr))
ret void
}
; CHECK-LABEL: {{^}}cast_constant_private_neg1_gv:
; CHECK: v_mov_b32_e32 v0, 0
; CHECK: v_mov_b32_e32 v1, 0
define void @cast_constant_private_neg1_gv() {
call void @flat_user(ptr addrspacecast (ptr addrspace(5) inttoptr (i32 -1 to ptr addrspace(5)) to ptr))
ret void
}
; CHECK-LABEL: {{^}}cast_constant_lds_other_gv:
; CHECK: s_mov_b64 s[{{[0-9]+}}:[[HIREG:[0-9]+]]], src_shared_base
; CHECK: v_mov_b32_e32 v0, 0x7b
; CHECK: v_mov_b32_e32 v1, s[[HIREG]]
define void @cast_constant_lds_other_gv() {
call void @flat_user(ptr addrspacecast (ptr addrspace(3) inttoptr (i32 123 to ptr addrspace(3)) to ptr))
ret void
}
; CHECK-LABEL: {{^}}cast_constant_private_other_gv:
; CHECK: s_mov_b64 s[{{[0-9]+}}:[[HIREG:[0-9]+]]], src_private_base
; CHECK: v_mov_b32_e32 v0, 0x7b
; CHECK: v_mov_b32_e32 v1, s[[HIREG]]
define void @cast_constant_private_other_gv() {
call void @flat_user(ptr addrspacecast (ptr addrspace(5) inttoptr (i32 123 to ptr addrspace(5)) to ptr))
ret void
}