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.7 KiB
LLVM
55 lines
1.7 KiB
LLVM
; RUN: opt -S -passes=hotcoldsplit -hotcoldsplit-threshold=0 < %s | FileCheck %s
|
|
|
|
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-apple-macosx10.14.0"
|
|
|
|
declare void @sideeffect(i64)
|
|
|
|
declare ptr @realloc(ptr %ptr, i64 %size)
|
|
|
|
declare void @free(ptr %ptr)
|
|
|
|
declare void @sink() cold
|
|
|
|
; CHECK-LABEL: define {{.*}}@realloc2(
|
|
; CHECK: call {{.*}}@sideeffect(
|
|
; CHECK: call {{.*}}@realloc(
|
|
; CHECK-LABEL: codeRepl:
|
|
; CHECK: %2 = call {{.*}}@realloc2.cold.1(i64 %size, ptr %ptr)
|
|
; CHECK-LABEL: cleanup:
|
|
; CHECK-NEXT: phi ptr [ null, %if.then ], [ %call, %if.end ], [ %2, %codeRepl ]
|
|
define ptr @realloc2(ptr %ptr, i64 %size) {
|
|
entry:
|
|
%0 = add i64 %size, -1
|
|
%1 = icmp ugt i64 %0, 184549375
|
|
br i1 %1, label %if.then, label %if.end
|
|
|
|
if.then: ; preds = %entry
|
|
call void @sideeffect(i64 %size)
|
|
br label %cleanup
|
|
|
|
if.end: ; preds = %entry
|
|
%call = call ptr @realloc(ptr %ptr, i64 %size)
|
|
%tobool1 = icmp eq ptr %call, null
|
|
br i1 %tobool1, label %if.then2, label %cleanup
|
|
|
|
if.then2: ; preds = %if.end
|
|
call void @sideeffect(i64 %size)
|
|
call void @sink()
|
|
%tobool3 = icmp eq ptr %ptr, null
|
|
br i1 %tobool3, label %cleanup, label %if.then4
|
|
|
|
if.then4: ; preds = %if.then2
|
|
call void @free(ptr %ptr)
|
|
br label %cleanup
|
|
|
|
cleanup: ; preds = %if.end, %if.then4, %if.then2, %if.then
|
|
%retval.0 = phi ptr [ null, %if.then ], [ null, %if.then2 ], [ null, %if.then4 ], [ %call, %if.end ]
|
|
ret ptr %retval.0
|
|
}
|
|
|
|
; CHECK-LABEL: define {{.*}}@realloc2.cold.1(
|
|
; CHECK: call {{.*}}@sideeffect
|
|
; CHECK: call {{.*}}@sink
|
|
; CHECK: call {{.*}}@free
|