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
102 lines
3.4 KiB
LLVM
102 lines
3.4 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
|
|
; RUN: llc --mtriple=loongarch64 --target-abi=lp64s --mattr=-f < %s | FileCheck %s
|
|
|
|
;; This file contains specific tests for the lp64s ABI.
|
|
|
|
define i64 @callee_float_in_regs(i64 %a, float %b) nounwind {
|
|
; CHECK-LABEL: callee_float_in_regs:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: addi.d $sp, $sp, -16
|
|
; CHECK-NEXT: st.d $ra, $sp, 8 # 8-byte Folded Spill
|
|
; CHECK-NEXT: st.d $fp, $sp, 0 # 8-byte Folded Spill
|
|
; CHECK-NEXT: move $fp, $a0
|
|
; CHECK-NEXT: move $a0, $a1
|
|
; CHECK-NEXT: pcaddu18i $ra, %call36(__fixsfdi)
|
|
; CHECK-NEXT: jirl $ra, $ra, 0
|
|
; CHECK-NEXT: add.d $a0, $fp, $a0
|
|
; CHECK-NEXT: ld.d $fp, $sp, 0 # 8-byte Folded Reload
|
|
; CHECK-NEXT: ld.d $ra, $sp, 8 # 8-byte Folded Reload
|
|
; CHECK-NEXT: addi.d $sp, $sp, 16
|
|
; CHECK-NEXT: ret
|
|
%b_fptosi = fptosi float %b to i64
|
|
%1 = add i64 %a, %b_fptosi
|
|
ret i64 %1
|
|
}
|
|
|
|
define i64 @caller_float_in_regs() nounwind {
|
|
; CHECK-LABEL: caller_float_in_regs:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: addi.d $sp, $sp, -16
|
|
; CHECK-NEXT: st.d $ra, $sp, 8 # 8-byte Folded Spill
|
|
; CHECK-NEXT: lu12i.w $a1, 262144
|
|
; CHECK-NEXT: ori $a0, $zero, 1
|
|
; CHECK-NEXT: pcaddu18i $ra, %call36(callee_float_in_regs)
|
|
; CHECK-NEXT: jirl $ra, $ra, 0
|
|
; CHECK-NEXT: ld.d $ra, $sp, 8 # 8-byte Folded Reload
|
|
; CHECK-NEXT: addi.d $sp, $sp, 16
|
|
; CHECK-NEXT: ret
|
|
%1 = call i64 @callee_float_in_regs(i64 1, float 2.0)
|
|
ret i64 %1
|
|
}
|
|
|
|
define i64 @callee_float_on_stack(i128 %a, i128 %b, i128 %c, i128 %d, float %e) nounwind {
|
|
; CHECK-LABEL: callee_float_on_stack:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: ld.w $a0, $sp, 0
|
|
; CHECK-NEXT: ret
|
|
%1 = trunc i128 %d to i64
|
|
%2 = bitcast float %e to i32
|
|
%3 = sext i32 %2 to i64
|
|
%4 = add i64 %1, %3
|
|
ret i64 %3
|
|
}
|
|
|
|
define i64 @caller_float_on_stack() nounwind {
|
|
; CHECK-LABEL: caller_float_on_stack:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: addi.d $sp, $sp, -16
|
|
; CHECK-NEXT: st.d $ra, $sp, 8 # 8-byte Folded Spill
|
|
; CHECK-NEXT: lu12i.w $a1, 264704
|
|
; CHECK-NEXT: ori $a0, $zero, 1
|
|
; CHECK-NEXT: ori $a2, $zero, 2
|
|
; CHECK-NEXT: ori $a4, $zero, 3
|
|
; CHECK-NEXT: ori $a6, $zero, 4
|
|
; CHECK-NEXT: st.d $a1, $sp, 0
|
|
; CHECK-NEXT: move $a1, $zero
|
|
; CHECK-NEXT: move $a3, $zero
|
|
; CHECK-NEXT: move $a5, $zero
|
|
; CHECK-NEXT: move $a7, $zero
|
|
; CHECK-NEXT: pcaddu18i $ra, %call36(callee_float_on_stack)
|
|
; CHECK-NEXT: jirl $ra, $ra, 0
|
|
; CHECK-NEXT: ld.d $ra, $sp, 8 # 8-byte Folded Reload
|
|
; CHECK-NEXT: addi.d $sp, $sp, 16
|
|
; CHECK-NEXT: ret
|
|
%1 = call i64 @callee_float_on_stack(i128 1, i128 2, i128 3, i128 4, float 5.0)
|
|
ret i64 %1
|
|
}
|
|
|
|
define float @callee_tiny_scalar_ret() nounwind {
|
|
; CHECK-LABEL: callee_tiny_scalar_ret:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: lu12i.w $a0, 260096
|
|
; CHECK-NEXT: ret
|
|
ret float 1.0
|
|
}
|
|
|
|
define i64 @caller_tiny_scalar_ret() nounwind {
|
|
; CHECK-LABEL: caller_tiny_scalar_ret:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: addi.d $sp, $sp, -16
|
|
; CHECK-NEXT: st.d $ra, $sp, 8 # 8-byte Folded Spill
|
|
; CHECK-NEXT: pcaddu18i $ra, %call36(callee_tiny_scalar_ret)
|
|
; CHECK-NEXT: jirl $ra, $ra, 0
|
|
; CHECK-NEXT: addi.w $a0, $a0, 0
|
|
; CHECK-NEXT: ld.d $ra, $sp, 8 # 8-byte Folded Reload
|
|
; CHECK-NEXT: addi.d $sp, $sp, 16
|
|
; CHECK-NEXT: ret
|
|
%1 = call float @callee_tiny_scalar_ret()
|
|
%2 = bitcast float %1 to i32
|
|
%3 = sext i32 %2 to i64
|
|
ret i64 %3
|
|
}
|