Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

116 lines
2.9 KiB
LLVM

; RUN: llc -enable-machine-outliner -mtriple=x86_64-apple-darwin < %s | FileCheck %s
@x = global i32 0, align 4
define i32 @check_boundaries() #0 {
; CHECK-LABEL: _check_boundaries:
%1 = alloca i32, align 4
%2 = alloca i32, align 4
%3 = alloca i32, align 4
%4 = alloca i32, align 4
%5 = alloca i32, align 4
store i32 0, ptr %1, align 4
store i32 0, ptr %2, align 4
%6 = load i32, ptr %2, align 4
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
; CHECK: callq
; CHECK-SAME: [[OFUNC1:OUTLINED_FUNCTION_[0-9]+]]
; CHECK: cmpl $0, -{{[0-9]+}}(%rbp)
store i32 1, ptr %2, align 4
store i32 2, ptr %3, align 4
store i32 3, ptr %4, align 4
store i32 4, ptr %5, align 4
br label %10
store i32 1, ptr %4, align 4
br label %10
%11 = load i32, ptr %2, align 4
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
; CHECK: callq
; CHECK-SAME: [[OFUNC1]]
store i32 1, ptr %2, align 4
store i32 2, ptr %3, align 4
store i32 3, ptr %4, align 4
store i32 4, ptr %5, align 4
br label %15
store i32 1, ptr %4, align 4
br label %15
ret i32 0
}
define i32 @empty_1() #0 {
; CHECK-LABEL: _empty_1:
; CHECK-NOT: OUTLINED_FUNCTION
ret i32 1
}
define i32 @empty_2() #0 {
; CHECK-LABEL: _empty_2
; CHECK-NOT: OUTLINED_FUNCTION
ret i32 1
}
define i32 @no_empty_outlining() #0 {
; CHECK-LABEL: _no_empty_outlining:
%1 = alloca i32, align 4
store i32 0, ptr %1, align 4
; CHECK-NOT: OUTLINED_FUNCTION
%2 = call i32 @empty_1() #1
%3 = call i32 @empty_2() #1
%4 = call i32 @empty_1() #1
%5 = call i32 @empty_2() #1
%6 = call i32 @empty_1() #1
%7 = call i32 @empty_2() #1
ret i32 0
}
define i32 @main() #0 {
; CHECK-LABEL: _main:
%1 = alloca i32, align 4
%2 = alloca i32, align 4
%3 = alloca i32, align 4
%4 = alloca i32, align 4
%5 = alloca i32, align 4
store i32 0, ptr %1, align 4
store i32 0, ptr @x, align 4
; CHECK: callq
; CHECK-SAME: [[OFUNC2:OUTLINED_FUNCTION_[0-9]+]]
store i32 1, ptr %2, align 4
store i32 2, ptr %3, align 4
store i32 3, ptr %4, align 4
store i32 4, ptr %5, align 4
store i32 1, ptr @x, align 4
call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
; CHECK: callq
; CHECK-SAME: [[OFUNC2]]
store i32 1, ptr %2, align 4
store i32 2, ptr %3, align 4
store i32 3, ptr %4, align 4
store i32 4, ptr %5, align 4
ret i32 0
}
attributes #0 = { noredzone nounwind ssp uwtable "frame-pointer"="all" }
; CHECK: OUTLINED_FUNCTION_{{[0-9]+}}:
; CHECK-DAG: movl $1, -{{[0-9]+}}(%rbp)
; CHECK-NEXT: movl $2, -{{[0-9]+}}(%rbp)
; CHECK-NEXT: movl $3, -{{[0-9]+}}(%rbp)
; CHECK-NEXT: movl $4, -{{[0-9]+}}(%rbp)
; CHECK-NEXT: retq
; CHECK: OUTLINED_FUNCTION_{{[0-9]+}}:
; CHECK-DAG: movl $1, -{{[0-9]+}}(%rbp)
; CHECK-NEXT: movl $2, -{{[0-9]+}}(%rbp)
; CHECK-NEXT: movl $3, -{{[0-9]+}}(%rbp)
; CHECK-NEXT: movl $4, -{{[0-9]+}}(%rbp)
; CHECK-NEXT: retq