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
47 lines
1.5 KiB
LLVM
47 lines
1.5 KiB
LLVM
; RUN: opt -S -aa-pipeline=basic-aa -passes=gvn < %s | FileCheck %s
|
|
|
|
declare void @argmemonly_function(ptr) argmemonly
|
|
|
|
define i32 @test0(ptr %P, ptr noalias %P2) {
|
|
; CHECK-LABEL: @test0(
|
|
%v1 = load i32, ptr %P
|
|
; CHECK: %v1 = load i32, ptr %P
|
|
call void @argmemonly_function(ptr %P2) [ "tag"() ]
|
|
; CHECK: call void @argmemonly_function(
|
|
%v2 = load i32, ptr %P
|
|
; CHECK: %v2 = load i32, ptr %P
|
|
%diff = sub i32 %v1, %v2
|
|
; CHECK: %diff = sub i32 %v1, %v2
|
|
ret i32 %diff
|
|
; CHECK: ret i32 %diff
|
|
}
|
|
|
|
define i32 @test1(ptr %P, ptr noalias %P2) {
|
|
; CHECK-LABEL: @test1(
|
|
%v1 = load i32, ptr %P
|
|
call void @argmemonly_function(ptr %P2) argmemonly [ "tag"() ]
|
|
; CHECK: call void @argmemonly_function(
|
|
%v2 = load i32, ptr %P
|
|
%diff = sub i32 %v1, %v2
|
|
ret i32 %diff
|
|
; CHECK: ret i32 0
|
|
}
|
|
|
|
define i32 @test2(ptr %P, ptr noalias %P2) {
|
|
; Note: in this test we //can// GVN %v1 and %v2 into one value in theory. Calls
|
|
; with deopt operand bundles are not argmemonly because they *read* the entire
|
|
; heap, but they don't write to any location in the heap if the callee does not
|
|
; deoptimize the caller. This fact, combined with the fact that
|
|
; @argmemonly_function is, well, an argmemonly function, can be used to conclude
|
|
; that %P is not written to at the callsite.
|
|
|
|
; CHECK-LABEL: @test2(
|
|
%v1 = load i32, ptr %P
|
|
call void @argmemonly_function(ptr %P2) [ "deopt"() ]
|
|
; CHECK: call void @argmemonly_function(
|
|
%v2 = load i32, ptr %P
|
|
%diff = sub i32 %v1, %v2
|
|
ret i32 %diff
|
|
; CHECK: ret i32 0
|
|
}
|