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
88 lines
2.0 KiB
LLVM
88 lines
2.0 KiB
LLVM
; RUN: opt -passes=globalopt -S < %s | FileCheck %s
|
|
|
|
@a = internal global i32 0, align 4
|
|
@b = internal global i32 0, align 4
|
|
@c = internal global i32 0, align 4
|
|
@d = internal constant [4 x i8] c"foo\00", align 1
|
|
@e = linkonce_odr global i32 0
|
|
@f = internal addrspace(3) global float undef, align 4
|
|
|
|
; CHECK: @a = internal global i32 0, align 4
|
|
; CHECK: @b = internal global i32 0, align 4
|
|
; CHECK: @c = internal unnamed_addr global i32 0, align 4
|
|
; CHECK: @d = internal unnamed_addr constant [4 x i8] c"foo\00", align 1
|
|
; CHECK: @e = linkonce_odr local_unnamed_addr global i32 0
|
|
; CHECK: @f = internal unnamed_addr addrspace(3) global float undef, align 4
|
|
|
|
; CHECK: define internal fastcc void @used_internal() unnamed_addr {
|
|
define internal void @used_internal() {
|
|
ret void
|
|
}
|
|
|
|
define i32 @get_e() {
|
|
call void @used_internal()
|
|
%t = load i32, ptr @e
|
|
ret i32 %t
|
|
}
|
|
|
|
define void @set_e(i32 %x) {
|
|
store i32 %x, ptr @e
|
|
ret void
|
|
}
|
|
|
|
define i1 @bah(i64 %i) nounwind readonly optsize ssp {
|
|
entry:
|
|
%arrayidx4 = getelementptr inbounds [4 x i8], ptr @d, i64 0, i64 %i
|
|
%tmp5 = load i8, ptr %arrayidx4, align 1
|
|
%tmp6 = load i8, ptr @d, align 1
|
|
%cmp = icmp eq i8 %tmp5, %tmp6
|
|
ret i1 %cmp
|
|
}
|
|
|
|
define void @baz(i32 %x) {
|
|
entry:
|
|
store i32 %x, ptr @a, align 4
|
|
store i32 %x, ptr @b, align 4
|
|
store i32 %x, ptr @c, align 4
|
|
ret void
|
|
}
|
|
|
|
define i32 @foo(ptr %x) nounwind readnone optsize ssp {
|
|
entry:
|
|
%cmp = icmp eq ptr %x, @a
|
|
%conv = zext i1 %cmp to i32
|
|
ret i32 %conv
|
|
}
|
|
|
|
define i32 @bar() {
|
|
entry:
|
|
switch i64 ptrtoint (ptr @b to i64), label %sw.epilog [
|
|
i64 1, label %return
|
|
i64 0, label %return
|
|
]
|
|
|
|
sw.epilog:
|
|
ret i32 0
|
|
|
|
return:
|
|
ret i32 1
|
|
}
|
|
|
|
define i32 @zed() {
|
|
entry:
|
|
%tmp1 = load i32, ptr @c, align 4
|
|
ret i32 %tmp1
|
|
}
|
|
|
|
define float @use_addrspace_cast_for_load() {
|
|
%p = addrspacecast ptr addrspace(3) @f to ptr
|
|
%v = load float, ptr %p
|
|
ret float %v
|
|
}
|
|
|
|
define void @use_addrspace_cast_for_store(float %x) {
|
|
%p = addrspacecast ptr addrspace(3) @f to ptr
|
|
store float %x, ptr %p
|
|
ret void
|
|
}
|