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.8 KiB
LLVM
61 lines
1.8 KiB
LLVM
; RUN: opt -passes=always-inline -S < %s | FileCheck %s
|
|
|
|
; We used to misclassify inalloca as a static alloca in the inliner. This only
|
|
; arose with for alwaysinline functions, because the normal inliner refuses to
|
|
; inline such things.
|
|
|
|
; Generated using this C++ source:
|
|
; struct Foo {
|
|
; Foo();
|
|
; Foo(const Foo &o);
|
|
; ~Foo();
|
|
; int a;
|
|
; };
|
|
; __forceinline void h(Foo o) {}
|
|
; __forceinline void g() { h(Foo()); }
|
|
; void f() { g(); }
|
|
|
|
; ModuleID = 't.cpp'
|
|
source_filename = "t.cpp"
|
|
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
|
target triple = "i386-pc-windows-msvc19.0.24210"
|
|
|
|
%struct.Foo = type { i32 }
|
|
|
|
declare ptr @llvm.stacksave()
|
|
declare void @llvm.stackrestore(ptr)
|
|
|
|
declare x86_thiscallcc ptr @"\01??0Foo@@QAE@XZ"(ptr returned) unnamed_addr
|
|
declare x86_thiscallcc void @"\01??1Foo@@QAE@XZ"(ptr) unnamed_addr
|
|
|
|
define void @f() {
|
|
entry:
|
|
call void @g()
|
|
ret void
|
|
}
|
|
|
|
define internal void @g() alwaysinline {
|
|
entry:
|
|
%inalloca.save = call ptr @llvm.stacksave()
|
|
%argmem = alloca inalloca <{ %struct.Foo }>, align 4
|
|
%call = call x86_thiscallcc ptr @"\01??0Foo@@QAE@XZ"(ptr %argmem)
|
|
call void @h(ptr inalloca(<{ %struct.Foo }>) %argmem)
|
|
call void @llvm.stackrestore(ptr %inalloca.save)
|
|
ret void
|
|
}
|
|
|
|
; Function Attrs: alwaysinline inlinehint nounwind
|
|
define internal void @h(ptr inalloca(<{ %struct.Foo }>)) alwaysinline {
|
|
entry:
|
|
call x86_thiscallcc void @"\01??1Foo@@QAE@XZ"(ptr %0)
|
|
ret void
|
|
}
|
|
|
|
; CHECK: define void @f()
|
|
; CHECK: %[[STACKSAVE:.*]] = call ptr @llvm.stacksave.p0()
|
|
; CHECK: %[[ARGMEM:.*]] = alloca inalloca <{ %struct.Foo }>, align 4
|
|
; CHECK: %[[CALL:.*]] = call x86_thiscallcc ptr @"\01??0Foo@@QAE@XZ"(ptr %[[ARGMEM]])
|
|
; CHECK: call x86_thiscallcc void @"\01??1Foo@@QAE@XZ"(ptr %[[ARGMEM]])
|
|
; CHECK: call void @llvm.stackrestore.p0(ptr %[[STACKSAVE]])
|
|
; CHECK: ret void
|