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
61 lines
1.9 KiB
LLVM
61 lines
1.9 KiB
LLVM
; RUN: opt -S -O3 -enable-devirtualize-speculatively %s 2>&1 | FileCheck %s
|
|
|
|
; Test that the devirtualized calls are inlined.
|
|
|
|
@vt1 = constant [1 x ptr] [ptr @vf], !type !0
|
|
@vt2 = constant [1 x ptr] [ptr @vf2], !type !1
|
|
|
|
|
|
define i1 @vf(ptr %this) {
|
|
ret i1 true
|
|
}
|
|
|
|
define i1 @vf2(ptr %this) {
|
|
ret i1 false
|
|
}
|
|
|
|
; CHECK: define i1 @call
|
|
define i1 @call(ptr %obj) #1 {
|
|
%vtable = load ptr, ptr %obj
|
|
%p = call i1 @llvm.public.type.test(ptr %vtable, metadata !"typeid")
|
|
call void @llvm.assume(i1 %p)
|
|
%fptr = load ptr, ptr %vtable
|
|
; if.true.direct_targ: ; preds = %0
|
|
; br label %if.end.icp
|
|
; if.false.orig_indirect: ; preds = %0
|
|
; %res = tail call i1 %fptr(ptr nonnull %obj)
|
|
; br label %if.end.icp
|
|
; if.end.icp: ; preds = %if.false.orig_indirect, %if.true.direct_targ
|
|
; %2 = phi i1 [ %res, %if.false.orig_indirect ], [ true, %if.true.direct_targ ]
|
|
; ret i1 %2
|
|
%res = call i1 %fptr(ptr %obj)
|
|
ret i1 %res
|
|
}
|
|
|
|
|
|
; CHECK: define i1 @call1
|
|
define i1 @call1(ptr %obj) #1 {
|
|
%vtable = load ptr, ptr %obj
|
|
%p = call i1 @llvm.type.test(ptr %vtable, metadata !"typeid1")
|
|
call void @llvm.assume(i1 %p)
|
|
%fptr = load ptr, ptr %vtable, align 8
|
|
; if.true.direct_targ: ; preds = %0
|
|
; br label %if.end.icp
|
|
; if.false.orig_indirect: ; preds = %0
|
|
; %res = tail call i1 %fptr(ptr nonnull %obj)
|
|
; br label %if.end.icp
|
|
; if.end.icp: ; preds = %if.false.orig_indirect, %if.true.direct_targ
|
|
; %2 = phi i1 [ %res, %if.false.orig_indirect ], [ false, %if.true.direct_targ ]
|
|
; ret i1 %2
|
|
%res = call i1 %fptr(ptr %obj)
|
|
ret i1 %res
|
|
}
|
|
|
|
|
|
declare i1 @llvm.type.test(ptr, metadata)
|
|
declare i1 @llvm.public.type.test(ptr, metadata)
|
|
declare void @llvm.assume(i1)
|
|
|
|
!0 = !{i32 0, !"typeid"}
|
|
!1 = !{i32 0, !"typeid1"}
|