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
66 lines
2.1 KiB
Plaintext
66 lines
2.1 KiB
Plaintext
// RUN: cir-opt %s -canonicalize -o - | FileCheck %s
|
|
|
|
// Verify that pointer-arithmetic ops marked Pure are eliminated when their
|
|
// results are unused (trivially dead).
|
|
|
|
!s32i = !cir.int<s, 32>
|
|
!u8i = !cir.int<u, 8>
|
|
!void = !cir.void
|
|
|
|
!rec_S = !cir.struct<"S" {!s32i, !s32i}>
|
|
!rec_Base = !cir.struct<"Base" {!u8i}>
|
|
!rec_Derived = !cir.struct<"Derived" {!rec_Base, !s32i}>
|
|
|
|
module {
|
|
|
|
// CHECK-LABEL: @dead_get_member
|
|
// CHECK-NOT: cir.get_member
|
|
cir.func @dead_get_member(%arg0: !cir.ptr<!rec_S>) {
|
|
%0 = cir.get_member %arg0[1] {name = "y"} : !cir.ptr<!rec_S> -> !cir.ptr<!s32i>
|
|
cir.return
|
|
}
|
|
|
|
// CHECK-LABEL: @dead_base_class_addr
|
|
// CHECK-NOT: cir.base_class_addr
|
|
cir.func @dead_base_class_addr(%arg0: !cir.ptr<!rec_Derived>) {
|
|
%0 = cir.base_class_addr %arg0 : !cir.ptr<!rec_Derived> nonnull [0] -> !cir.ptr<!rec_Base>
|
|
cir.return
|
|
}
|
|
|
|
// CHECK-LABEL: @dead_derived_class_addr
|
|
// CHECK-NOT: cir.derived_class_addr
|
|
cir.func @dead_derived_class_addr(%arg0: !cir.ptr<!rec_Base>) {
|
|
%0 = cir.derived_class_addr %arg0 : !cir.ptr<!rec_Base> nonnull [0] -> !cir.ptr<!rec_Derived>
|
|
cir.return
|
|
}
|
|
|
|
// CHECK-LABEL: @dead_vtable_get_vptr
|
|
// CHECK-NOT: cir.vtable.get_vptr
|
|
cir.func @dead_vtable_get_vptr(%arg0: !cir.ptr<!rec_Derived>) {
|
|
%0 = cir.vtable.get_vptr %arg0 : !cir.ptr<!rec_Derived> -> !cir.ptr<!cir.vptr>
|
|
cir.return
|
|
}
|
|
|
|
// CHECK-LABEL: @dead_vtable_get_virtual_fn_addr
|
|
// CHECK-NOT: cir.vtable.get_virtual_fn_addr
|
|
cir.func @dead_vtable_get_virtual_fn_addr(%arg0: !cir.vptr) {
|
|
%0 = cir.vtable.get_virtual_fn_addr %arg0[0] : !cir.vptr -> !cir.ptr<!cir.ptr<!cir.func<(!cir.ptr<!rec_Base>)>>>
|
|
cir.return
|
|
}
|
|
|
|
// CHECK-LABEL: @dead_vtable_get_type_info
|
|
// CHECK-NOT: cir.vtable.get_type_info
|
|
cir.func @dead_vtable_get_type_info(%arg0: !cir.vptr) {
|
|
%0 = cir.vtable.get_type_info %arg0 : !cir.vptr -> !cir.ptr<!cir.ptr<!rec_S>>
|
|
cir.return
|
|
}
|
|
|
|
// CHECK-LABEL: @dead_get_runtime_member
|
|
// CHECK-NOT: cir.get_runtime_member
|
|
cir.func @dead_get_runtime_member(%arg0: !cir.ptr<!rec_S>, %arg1: !cir.data_member<!s32i in !rec_S>) {
|
|
%0 = cir.get_runtime_member %arg0[%arg1 : !cir.data_member<!s32i in !rec_S>] : !cir.ptr<!rec_S> -> !cir.ptr<!s32i>
|
|
cir.return
|
|
}
|
|
|
|
}
|