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
51 lines
2.0 KiB
LLVM
51 lines
2.0 KiB
LLVM
; RUN: opt < %s -passes='require<profile-summary>,function(codegenprepare)' -S -mtriple=x86_64 | FileCheck %s --implicit-check-not="llvm.fake.use"
|
|
;
|
|
; When performing return duplication to enable
|
|
; tail call optimization we clone fake uses that exist in the to-be-eliminated
|
|
; return block into the predecessor blocks. When doing this with fake uses
|
|
; of PHI-nodes, they cannot be easily copied, but require the correct operand.
|
|
; We are currently not able to do this correctly, so we suppress the cloning
|
|
; of such fake uses at the moment.
|
|
;
|
|
; There should be no fake use of a call result in any of the resulting return
|
|
; blocks.
|
|
|
|
; Fake uses of `this` should be duplicated into both return blocks.
|
|
; CHECK: if.then:
|
|
; CHECK: @llvm.fake.use({{.*}}this
|
|
; CHECK: if.else:
|
|
; CHECK: @llvm.fake.use({{.*}}this
|
|
|
|
; CHECK: declare void @llvm.fake.use
|
|
|
|
source_filename = "test.ll"
|
|
|
|
%class.a = type { i8 }
|
|
|
|
declare i32 @foo(ptr nonnull dereferenceable(1)) local_unnamed_addr
|
|
declare i32 @bar(ptr nonnull dereferenceable(1)) local_unnamed_addr
|
|
|
|
define hidden void @func(ptr nonnull dereferenceable(1) %this) local_unnamed_addr align 2 optdebug {
|
|
entry:
|
|
%b = getelementptr inbounds %class.a, ptr %this, i64 0, i32 0
|
|
%0 = load i8, i8* %b, align 1
|
|
%tobool.not = icmp eq i8 %0, 0
|
|
br i1 %tobool.not, label %if.else, label %if.then
|
|
|
|
if.then: ; preds = %entry
|
|
%call = tail call i32 @foo(ptr nonnull dereferenceable(1) %this)
|
|
%call2 = tail call i32 @bar(ptr nonnull dereferenceable(1) %this)
|
|
br label %if.end
|
|
|
|
if.else: ; preds = %entry
|
|
%call4 = tail call i32 @bar(ptr nonnull dereferenceable(1) %this)
|
|
%call5 = tail call i32 @foo(ptr nonnull dereferenceable(1) %this)
|
|
br label %if.end
|
|
|
|
if.end: ; preds = %if.else, %if.then
|
|
%call4.sink = phi i32 [ %call4, %if.else ], [ %call, %if.then ]
|
|
notail call void (...) @llvm.fake.use(i32 %call4.sink)
|
|
notail call void (...) @llvm.fake.use(ptr nonnull %this)
|
|
ret void
|
|
}
|