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
95 lines
3.4 KiB
LLVM
95 lines
3.4 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=riscv32 -target-abi=ilp32 -mattr=+d -verify-machineinstrs < %s | FileCheck -check-prefix=RV32LE %s
|
|
; RUN: llc -mtriple=riscv32be -target-abi=ilp32 -mattr=+d -verify-machineinstrs < %s | FileCheck -check-prefix=RV32BE %s
|
|
|
|
; Test f64 function calls with D extension and soft-float ABI
|
|
; This specifically tests the LowerCall path that needs to swap Lo/Hi for BE
|
|
|
|
declare double @external_func(double, double)
|
|
|
|
define double @test_f64_call(double %a, double %b) {
|
|
; RV32LE-LABEL: test_f64_call:
|
|
; RV32LE: # %bb.0:
|
|
; RV32LE-NEXT: addi sp, sp, -16
|
|
; RV32LE-NEXT: .cfi_def_cfa_offset 16
|
|
; RV32LE-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
|
|
; RV32LE-NEXT: .cfi_offset ra, -4
|
|
; RV32LE-NEXT: call external_func
|
|
; RV32LE-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
|
|
; RV32LE-NEXT: .cfi_restore ra
|
|
; RV32LE-NEXT: addi sp, sp, 16
|
|
; RV32LE-NEXT: .cfi_def_cfa_offset 0
|
|
; RV32LE-NEXT: ret
|
|
;
|
|
; RV32BE-LABEL: test_f64_call:
|
|
; RV32BE: # %bb.0:
|
|
; RV32BE-NEXT: addi sp, sp, -16
|
|
; RV32BE-NEXT: .cfi_def_cfa_offset 16
|
|
; RV32BE-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
|
|
; RV32BE-NEXT: .cfi_offset ra, -4
|
|
; RV32BE-NEXT: call external_func
|
|
; RV32BE-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
|
|
; RV32BE-NEXT: .cfi_restore ra
|
|
; RV32BE-NEXT: addi sp, sp, 16
|
|
; RV32BE-NEXT: .cfi_def_cfa_offset 0
|
|
; RV32BE-NEXT: ret
|
|
%result = call double @external_func(double %a, double %b)
|
|
ret double %result
|
|
}
|
|
|
|
; Test with a computation before the call to force SplitF64
|
|
define double @test_f64_call_with_fadd(double %a, double %b) {
|
|
; RV32LE-LABEL: test_f64_call_with_fadd:
|
|
; RV32LE: # %bb.0:
|
|
; RV32LE-NEXT: addi sp, sp, -16
|
|
; RV32LE-NEXT: .cfi_def_cfa_offset 16
|
|
; RV32LE-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
|
|
; RV32LE-NEXT: .cfi_offset ra, -4
|
|
; RV32LE-NEXT: sw a2, 0(sp)
|
|
; RV32LE-NEXT: sw a3, 4(sp)
|
|
; RV32LE-NEXT: fld fa5, 0(sp)
|
|
; RV32LE-NEXT: sw a0, 0(sp)
|
|
; RV32LE-NEXT: sw a1, 4(sp)
|
|
; RV32LE-NEXT: fld fa4, 0(sp)
|
|
; RV32LE-NEXT: fadd.d fa5, fa4, fa5
|
|
; RV32LE-NEXT: fsd fa5, 0(sp)
|
|
; RV32LE-NEXT: lw a0, 0(sp)
|
|
; RV32LE-NEXT: lw a1, 4(sp)
|
|
; RV32LE-NEXT: mv a2, a0
|
|
; RV32LE-NEXT: mv a3, a1
|
|
; RV32LE-NEXT: call external_func
|
|
; RV32LE-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
|
|
; RV32LE-NEXT: .cfi_restore ra
|
|
; RV32LE-NEXT: addi sp, sp, 16
|
|
; RV32LE-NEXT: .cfi_def_cfa_offset 0
|
|
; RV32LE-NEXT: ret
|
|
;
|
|
; RV32BE-LABEL: test_f64_call_with_fadd:
|
|
; RV32BE: # %bb.0:
|
|
; RV32BE-NEXT: addi sp, sp, -16
|
|
; RV32BE-NEXT: .cfi_def_cfa_offset 16
|
|
; RV32BE-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
|
|
; RV32BE-NEXT: .cfi_offset ra, -4
|
|
; RV32BE-NEXT: sw a2, 0(sp)
|
|
; RV32BE-NEXT: sw a3, 4(sp)
|
|
; RV32BE-NEXT: fld fa5, 0(sp)
|
|
; RV32BE-NEXT: sw a0, 0(sp)
|
|
; RV32BE-NEXT: sw a1, 4(sp)
|
|
; RV32BE-NEXT: fld fa4, 0(sp)
|
|
; RV32BE-NEXT: fadd.d fa5, fa4, fa5
|
|
; RV32BE-NEXT: fsd fa5, 0(sp)
|
|
; RV32BE-NEXT: lw a0, 0(sp)
|
|
; RV32BE-NEXT: lw a1, 4(sp)
|
|
; RV32BE-NEXT: mv a2, a0
|
|
; RV32BE-NEXT: mv a3, a1
|
|
; RV32BE-NEXT: call external_func
|
|
; RV32BE-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
|
|
; RV32BE-NEXT: .cfi_restore ra
|
|
; RV32BE-NEXT: addi sp, sp, 16
|
|
; RV32BE-NEXT: .cfi_def_cfa_offset 0
|
|
; RV32BE-NEXT: ret
|
|
%sum = fadd double %a, %b
|
|
%result = call double @external_func(double %sum, double %sum)
|
|
ret double %result
|
|
}
|