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

91 lines
2.7 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
; @foo is optimized for size. Variables %p2, %p3, %p4, %p5 and %p6 are not split
; in cold blocks.
define i64 @foo(ptr %ptr, i64 %p2, i64 %p3, i64 %p4, i64 %p5, i64 %p6) optsize {
; CHECK-LABEL: foo:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: pushq %r15
; CHECK-NEXT: .cfi_def_cfa_offset 16
; CHECK-NEXT: pushq %r14
; CHECK-NEXT: .cfi_def_cfa_offset 24
; CHECK-NEXT: pushq %r13
; CHECK-NEXT: .cfi_def_cfa_offset 32
; CHECK-NEXT: pushq %r12
; CHECK-NEXT: .cfi_def_cfa_offset 40
; CHECK-NEXT: pushq %rbx
; CHECK-NEXT: .cfi_def_cfa_offset 48
; CHECK-NEXT: .cfi_offset %rbx, -48
; CHECK-NEXT: .cfi_offset %r12, -40
; CHECK-NEXT: .cfi_offset %r13, -32
; CHECK-NEXT: .cfi_offset %r14, -24
; CHECK-NEXT: .cfi_offset %r15, -16
; CHECK-NEXT: movq %r9, %r14
; CHECK-NEXT: movq %r8, %rbx
; CHECK-NEXT: movq %rcx, %r12
; CHECK-NEXT: movq %rdx, %r15
; CHECK-NEXT: movq %rsi, %r13
; CHECK-NEXT: testq %rdi, %rdi
; CHECK-NEXT: je .LBB0_1
; CHECK-NEXT: # %bb.2: # %if.else
; CHECK-NEXT: testq %r13, %r13
; CHECK-NEXT: movq %r15, %rax
; CHECK-NEXT: je .LBB0_3
; CHECK-NEXT: .LBB0_4: # %if.end
; CHECK-NEXT: addq %r13, %rax
; CHECK-NEXT: addq %r12, %r15
; CHECK-NEXT: addq %rax, %r15
; CHECK-NEXT: addq %r14, %rbx
; CHECK-NEXT: addq %r15, %rbx
; CHECK-NEXT: movq %rbx, %rax
; CHECK-NEXT: popq %rbx
; CHECK-NEXT: .cfi_def_cfa_offset 40
; CHECK-NEXT: popq %r12
; CHECK-NEXT: .cfi_def_cfa_offset 32
; CHECK-NEXT: popq %r13
; CHECK-NEXT: .cfi_def_cfa_offset 24
; CHECK-NEXT: popq %r14
; CHECK-NEXT: .cfi_def_cfa_offset 16
; CHECK-NEXT: popq %r15
; CHECK-NEXT: .cfi_def_cfa_offset 8
; CHECK-NEXT: retq
; CHECK-NEXT: .LBB0_1: # %if.then
; CHECK-NEXT: .cfi_def_cfa_offset 48
; CHECK-NEXT: callq bar1@PLT
; CHECK-NEXT: jmp .LBB0_4
; CHECK-NEXT: .LBB0_3: # %if.then2
; CHECK-NEXT: callq bar2@PLT
; CHECK-NEXT: jmp .LBB0_4
entry:
%tobool.not = icmp eq ptr %ptr, null
br i1 %tobool.not, label %if.then, label %if.else, !prof !5
if.then: ; preds = %entry
%call1 = call i64 @bar1()
br label %if.end
if.else:
%cond = icmp eq i64 %p2, 0
br i1 %cond, label %if.then2, label %if.end, !prof !5
if.then2:
%call2 = call i64 @bar2()
br label %if.end
if.end:
%call = phi i64 [ %call1, %if.then ], [%call2, %if.then2], [ %p3, %if.else ]
%add1 = add i64 %call, %p2
%add2 = add i64 %add1, %p3
%add3 = add i64 %add2, %p4
%add4 = add i64 %add3, %p5
%res = add i64 %add4, %p6
ret i64 %res
}
!5 = !{!"branch_weights", i32 1, i32 2000}
declare i64 @bar1()
declare i64 @bar2()