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
152 lines
4.5 KiB
LLVM
152 lines
4.5 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
|
|
; RUN: llc --fast-isel < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
|
|
|
|
define i8 @test_direct_call(ptr %f) nounwind {
|
|
; CHECK-LABEL: test_direct_call:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: pushq %rax
|
|
; CHECK-NEXT: callq foo@PLT
|
|
; CHECK-NEXT: pextrw $0, %xmm0, %eax
|
|
; CHECK-NEXT: shll $16, %eax
|
|
; CHECK-NEXT: movd %eax, %xmm0
|
|
; CHECK-NEXT: callq __truncsfbf2@PLT
|
|
; CHECK-NEXT: callq bar@PLT
|
|
; CHECK-NEXT: popq %rcx
|
|
; CHECK-NEXT: retq
|
|
entry:
|
|
%call = call bfloat @foo(ptr %f)
|
|
%call2 = call zeroext i8 @bar(bfloat %call)
|
|
ret i8 %call2
|
|
}
|
|
|
|
define i8 @test_fast_direct_call(ptr %f) nounwind {
|
|
; CHECK-LABEL: test_fast_direct_call:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: pushq %rax
|
|
; CHECK-NEXT: callq foo_fast@PLT
|
|
; CHECK-NEXT: pextrw $0, %xmm0, %eax
|
|
; CHECK-NEXT: shll $16, %eax
|
|
; CHECK-NEXT: movd %eax, %xmm0
|
|
; CHECK-NEXT: callq __truncsfbf2@PLT
|
|
; CHECK-NEXT: callq bar@PLT
|
|
; CHECK-NEXT: popq %rcx
|
|
; CHECK-NEXT: retq
|
|
entry:
|
|
%call = call fastcc bfloat @foo_fast(ptr %f)
|
|
%call2 = call zeroext i8 @bar(bfloat %call)
|
|
ret i8 %call2
|
|
}
|
|
|
|
define i8 @test_indirect_all(ptr %fptr, ptr %f) nounwind {
|
|
; CHECK-LABEL: test_indirect_all:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: pushq %rbx
|
|
; CHECK-NEXT: movq %rdi, %rbx
|
|
; CHECK-NEXT: movq %rsi, %rdi
|
|
; CHECK-NEXT: callq foo@PLT
|
|
; CHECK-NEXT: pextrw $0, %xmm0, %eax
|
|
; CHECK-NEXT: shll $16, %eax
|
|
; CHECK-NEXT: movd %eax, %xmm0
|
|
; CHECK-NEXT: callq __truncsfbf2@PLT
|
|
; CHECK-NEXT: callq *%rbx
|
|
; CHECK-NEXT: popq %rbx
|
|
; CHECK-NEXT: retq
|
|
entry:
|
|
%call = call bfloat @foo(ptr %f)
|
|
%call2 = call zeroext i8 %fptr(bfloat %call)
|
|
ret i8 %call2
|
|
}
|
|
|
|
define i8 @test_indirect_all2(ptr %fptr, ptr %f, i1 %cond) nounwind {
|
|
; CHECK-LABEL: test_indirect_all2:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: pushq %rbp
|
|
; CHECK-NEXT: pushq %rbx
|
|
; CHECK-NEXT: pushq %rax
|
|
; CHECK-NEXT: movl %edx, %ebp
|
|
; CHECK-NEXT: movq %rdi, %rbx
|
|
; CHECK-NEXT: movq %rsi, %rdi
|
|
; CHECK-NEXT: callq foo@PLT
|
|
; CHECK-NEXT: testb $1, %bpl
|
|
; CHECK-NEXT: je .LBB3_2
|
|
; CHECK-NEXT: # %bb.1: # %exit
|
|
; CHECK-NEXT: pextrw $0, %xmm0, %eax
|
|
; CHECK-NEXT: shll $16, %eax
|
|
; CHECK-NEXT: movd %eax, %xmm0
|
|
; CHECK-NEXT: callq __truncsfbf2@PLT
|
|
; CHECK-NEXT: callq *%rbx
|
|
; CHECK-NEXT: jmp .LBB3_3
|
|
; CHECK-NEXT: .LBB3_2: # %exit2
|
|
; CHECK-NEXT: movb $3, %al
|
|
; CHECK-NEXT: .LBB3_3: # %exit2
|
|
; CHECK-NEXT: addq $8, %rsp
|
|
; CHECK-NEXT: popq %rbx
|
|
; CHECK-NEXT: popq %rbp
|
|
; CHECK-NEXT: retq
|
|
entry:
|
|
%call = call bfloat @foo(ptr %f)
|
|
br i1 %cond, label %exit, label %exit2
|
|
|
|
exit:
|
|
%call2 = call zeroext i8 %fptr(bfloat %call)
|
|
ret i8 %call2
|
|
|
|
exit2:
|
|
ret i8 3
|
|
}
|
|
|
|
|
|
define i8 @test_fast_indirect_all(ptr %fptr, ptr %f) nounwind {
|
|
; CHECK-LABEL: test_fast_indirect_all:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: pushq %rbx
|
|
; CHECK-NEXT: movq %rdi, %rbx
|
|
; CHECK-NEXT: movq %rsi, %rdi
|
|
; CHECK-NEXT: callq foo@PLT
|
|
; CHECK-NEXT: pextrw $0, %xmm0, %eax
|
|
; CHECK-NEXT: shll $16, %eax
|
|
; CHECK-NEXT: movd %eax, %xmm0
|
|
; CHECK-NEXT: callq __truncsfbf2@PLT
|
|
; CHECK-NEXT: callq *%rbx
|
|
; CHECK-NEXT: popq %rbx
|
|
; CHECK-NEXT: retq
|
|
entry:
|
|
%call = call fastcc bfloat @foo(ptr %f)
|
|
%call2 = call zeroext i8 %fptr(bfloat %call)
|
|
ret i8 %call2
|
|
}
|
|
|
|
declare { bfloat, bfloat } @get_bfloats()
|
|
declare void @take_bfloats({ bfloat, bfloat })
|
|
|
|
define void @call_get_bfloats() nounwind {
|
|
; CHECK-LABEL: call_get_bfloats:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: pushq %rax
|
|
; CHECK-NEXT: callq get_bfloats@PLT
|
|
; CHECK-NEXT: pextrw $0, %xmm1, %eax
|
|
; CHECK-NEXT: shll $16, %eax
|
|
; CHECK-NEXT: movl %eax, (%rsp) # 4-byte Spill
|
|
; CHECK-NEXT: pextrw $0, %xmm0, %eax
|
|
; CHECK-NEXT: shll $16, %eax
|
|
; CHECK-NEXT: movd %eax, %xmm0
|
|
; CHECK-NEXT: callq __truncsfbf2@PLT
|
|
; CHECK-NEXT: movd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Folded Spill
|
|
; CHECK-NEXT: movss (%rsp), %xmm0 # 4-byte Reload
|
|
; CHECK-NEXT: # xmm0 = mem[0],zero,zero,zero
|
|
; CHECK-NEXT: callq __truncsfbf2@PLT
|
|
; CHECK-NEXT: movaps %xmm0, %xmm1
|
|
; CHECK-NEXT: movss {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 4-byte Reload
|
|
; CHECK-NEXT: # xmm0 = mem[0],zero,zero,zero
|
|
; CHECK-NEXT: callq take_bfloats@PLT
|
|
; CHECK-NEXT: popq %rax
|
|
; CHECK-NEXT: retq
|
|
%res = call { bfloat, bfloat } @get_bfloats()
|
|
call void @take_bfloats({ bfloat, bfloat } %res)
|
|
ret void
|
|
}
|
|
|
|
declare bfloat @foo(ptr %f)
|
|
declare zeroext i8 @bar(bfloat)
|
|
declare fastcc bfloat @foo_fast(ptr %f)
|