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
42 lines
1.3 KiB
LLVM
42 lines
1.3 KiB
LLVM
; RUN: opt < %s -passes=globalopt -S | FileCheck %s
|
|
|
|
; Test the evaluation of a load via a bitcast and a store via a GEP.
|
|
; Check that globals are constant folded to the correct value.
|
|
|
|
; CHECK: @u = dso_local local_unnamed_addr global %union.A { ptr inttoptr (i64 12345 to ptr) }, align 8
|
|
; CHECK: @l = dso_local local_unnamed_addr global i64 12345, align 8
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
%union.A = type { ptr }
|
|
|
|
$_ZN1AC2Ex = comdat any
|
|
|
|
@u = dso_local global %union.A zeroinitializer, align 8
|
|
@l = dso_local global i64 0, align 8
|
|
@llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I_test.cpp, ptr null }]
|
|
|
|
define internal void @__cxx_global_var_init() section ".text.startup" {
|
|
call void @_ZN1AC2Ex(ptr @u, i64 12345)
|
|
ret void
|
|
}
|
|
|
|
define linkonce_odr dso_local void @_ZN1AC2Ex(ptr %this, i64 %ll) unnamed_addr comdat align 2 {
|
|
%l = inttoptr i64 %ll to ptr
|
|
store ptr %l, ptr %this
|
|
ret void
|
|
}
|
|
|
|
define internal void @__cxx_global_var_init.1() section ".text.startup" {
|
|
%1 = load i64, ptr @u, align 8
|
|
store i64 %1, ptr @l, align 8
|
|
ret void
|
|
}
|
|
|
|
define internal void @_GLOBAL__sub_I_test.cpp() section ".text.startup" {
|
|
call void @__cxx_global_var_init()
|
|
call void @__cxx_global_var_init.1()
|
|
ret void
|
|
}
|