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
55 lines
1.9 KiB
LLVM
55 lines
1.9 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt -S -passes=newgvn < %s | FileCheck %s
|
|
|
|
|
|
; MemorySSA says that load1 depends on the lifetime start.
|
|
; That's OK since MemorySSA is may-alias; however, NewGVN should
|
|
; check whether the lifetime start *actually* defines the loaded pointer
|
|
; before simplifying to uninitialized memory.
|
|
define void @foo(ptr %arg) {
|
|
; CHECK-LABEL: define void @foo(
|
|
; CHECK-SAME: ptr [[ARG:%.*]]) {
|
|
; CHECK-NEXT: [[BB:.*:]]
|
|
; CHECK-NEXT: [[ALLOCA:%.*]] = alloca i8, align 16
|
|
; CHECK-NEXT: call void @llvm.lifetime.start.p0(ptr [[ALLOCA]])
|
|
; CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr [[ARG]], align 8
|
|
; CHECK-NEXT: [[LOAD1:%.*]] = load ptr, ptr [[LOAD]], align 8
|
|
; CHECK-NEXT: [[CALL:%.*]] = call ptr [[LOAD1]](ptr [[ALLOCA]])
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
bb:
|
|
%alloca = alloca i8, align 16
|
|
call void @llvm.lifetime.start.p0(ptr %alloca)
|
|
%load = load ptr, ptr %arg, align 8
|
|
%load1 = load ptr, ptr %load, align 8
|
|
%call = call ptr %load1(ptr %alloca)
|
|
ret void
|
|
}
|
|
|
|
declare void @llvm.lifetime.start.p0(ptr captures(none)) #0
|
|
|
|
declare ptr @malloc(i64)
|
|
|
|
; This case is handled correctly.
|
|
; Since malloc returns a pointer, NewGVN checks whether
|
|
; it is the same pointer, an equivalent one, or a must-alias.
|
|
define void @wombat(ptr %arg) {
|
|
; CHECK-LABEL: define void @wombat(
|
|
; CHECK-SAME: ptr [[ARG:%.*]]) {
|
|
; CHECK-NEXT: [[BB:.*:]]
|
|
; CHECK-NEXT: [[CALL:%.*]] = call ptr @malloc(i64 1)
|
|
; CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr [[ARG]], align 8
|
|
; CHECK-NEXT: [[LOAD1:%.*]] = load ptr, ptr [[LOAD]], align 8
|
|
; CHECK-NEXT: [[CALL2:%.*]] = call ptr [[LOAD1]](ptr [[CALL]])
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
bb:
|
|
%call = call ptr @malloc(i64 1)
|
|
%load = load ptr, ptr %arg, align 8
|
|
%load1 = load ptr, ptr %load, align 8
|
|
%call2 = call ptr %load1(ptr %call)
|
|
ret void
|
|
}
|
|
|
|
attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|