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
54 lines
1.4 KiB
LLVM
54 lines
1.4 KiB
LLVM
; RUN: opt -passes='require<profile-summary>,function(codegenprepare)' -S -mtriple=x86_64-linux < %s | FileCheck %s
|
|
|
|
; The ret instruction can be duplicated into BB case2 even though there is an
|
|
; intermediate BB exit1 and call to llvm.assume.
|
|
|
|
@ptr = external global ptr, align 8
|
|
|
|
; CHECK: %ret1 = tail call ptr @qux()
|
|
; CHECK-NEXT: ret ptr %ret1
|
|
|
|
; CHECK: %ret2 = tail call ptr @bar()
|
|
; CHECK-NEXT: ret ptr %ret2
|
|
|
|
define ptr @foo(i64 %size, i64 %v1, i64 %v2) {
|
|
entry:
|
|
%a = alloca i8
|
|
call void @llvm.lifetime.start.p0(ptr %a) nounwind
|
|
%cmp1 = icmp ult i64 %size, 1025
|
|
br i1 %cmp1, label %if.end, label %case1
|
|
|
|
case1:
|
|
%ret1 = tail call ptr @qux()
|
|
br label %exit2
|
|
|
|
if.end:
|
|
%cmp2 = icmp ult i64 %v1, %v2
|
|
br i1 %cmp2, label %case3, label %case2
|
|
|
|
case2:
|
|
%ret2 = tail call ptr @bar()
|
|
br label %exit1
|
|
|
|
case3:
|
|
%ret3 = load ptr, ptr @ptr, align 8
|
|
br label %exit1
|
|
|
|
exit1:
|
|
%retval1 = phi ptr [ %ret2, %case2 ], [ %ret3, %case3 ]
|
|
%cmp3 = icmp ne ptr %retval1, null
|
|
tail call void @llvm.assume(i1 %cmp3)
|
|
br label %exit2
|
|
|
|
exit2:
|
|
%retval2 = phi ptr [ %ret1, %case1 ], [ %retval1, %exit1 ]
|
|
call void @llvm.lifetime.end.p0(ptr %a) nounwind
|
|
ret ptr %retval2
|
|
}
|
|
|
|
declare void @llvm.assume(i1)
|
|
declare ptr @qux()
|
|
declare ptr @bar()
|
|
declare void @llvm.lifetime.start.p0(ptr nocapture) nounwind
|
|
declare void @llvm.lifetime.end.p0(ptr nocapture) nounwind
|