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
37 lines
1.6 KiB
LLVM
37 lines
1.6 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 5
|
|
; RUN: opt -p globalopt -S %s | FileCheck %s
|
|
|
|
@G = internal global [2 x i64 ] zeroinitializer
|
|
@H = internal global [2 x i64 ] zeroinitializer
|
|
|
|
;.
|
|
; CHECK: @G = internal global [2 x i64] zeroinitializer
|
|
; CHECK: @H = internal global [2 x i64] zeroinitializer
|
|
;.
|
|
define i64 @G_used_by_gep_inttoptr_exprs() {
|
|
; CHECK-LABEL: define i64 @G_used_by_gep_inttoptr_exprs() local_unnamed_addr {
|
|
; CHECK-NEXT: [[L:%.*]] = load i64, ptr @G, align 8
|
|
; CHECK-NEXT: [[GEP:%.*]] = getelementptr i8, ptr inttoptr (i64 add (i64 ptrtoint (ptr getelementptr inbounds nuw (i8, ptr @G, i64 16) to i64), i64 8) to ptr), i64 1
|
|
; CHECK-NEXT: [[C:%.*]] = icmp eq ptr [[GEP]], @G
|
|
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[C]], i64 [[L]], i64 9
|
|
; CHECK-NEXT: ret i64 [[SEL]]
|
|
;
|
|
%l = load i64, ptr @G, align 8
|
|
%gep = getelementptr i8, ptr inttoptr (i64 add (i64 ptrtoint (ptr getelementptr inbounds nuw (i8, ptr @G, i64 16) to i64), i64 8) to ptr), i64 1
|
|
%c = icmp eq ptr %gep, @G
|
|
%sel = select i1 %c, i64 %l, i64 9
|
|
ret i64 %sel
|
|
}
|
|
|
|
define i64 @H_constexpr_stored(ptr %p) {
|
|
; CHECK-LABEL: define i64 @H_constexpr_stored(
|
|
; CHECK-SAME: ptr [[P:%.*]]) local_unnamed_addr {
|
|
; CHECK-NEXT: [[L:%.*]] = load i64, ptr @H, align 8
|
|
; CHECK-NEXT: store i64 ptrtoint (ptr getelementptr inbounds nuw (i8, ptr @H, i64 16) to i64), ptr [[P]], align 4
|
|
; CHECK-NEXT: ret i64 [[L]]
|
|
;
|
|
%l = load i64, ptr @H, align 8
|
|
store i64 ptrtoint (ptr getelementptr inbounds nuw (i8, ptr @H, i64 16) to i64), ptr %p
|
|
ret i64 %l
|
|
}
|