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
183 lines
4.9 KiB
LLVM
183 lines
4.9 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=riscv64 -mattr=+d -verify-machineinstrs < %s \
|
|
; RUN: -target-abi=lp64d | FileCheck %s -check-prefix=RV64ID
|
|
; RUN: llc -mtriple=riscv64 -mattr=+zdinx -verify-machineinstrs < %s \
|
|
; RUN: -target-abi=lp64 | FileCheck %s -check-prefix=RV64IDINX
|
|
|
|
; This file exhaustively checks double<->i32 conversions. In general,
|
|
; fcvt.l[u].d can be selected instead of fcvt.w[u].d because poison is
|
|
; generated for an fpto[s|u]i conversion if the result doesn't fit in the
|
|
; target type.
|
|
|
|
define i32 @aext_fptosi(double %a) nounwind {
|
|
; RV64ID-LABEL: aext_fptosi:
|
|
; RV64ID: # %bb.0:
|
|
; RV64ID-NEXT: fcvt.w.d a0, fa0, rtz
|
|
; RV64ID-NEXT: ret
|
|
;
|
|
; RV64IDINX-LABEL: aext_fptosi:
|
|
; RV64IDINX: # %bb.0:
|
|
; RV64IDINX-NEXT: fcvt.w.d a0, a0, rtz
|
|
; RV64IDINX-NEXT: ret
|
|
%1 = fptosi double %a to i32
|
|
ret i32 %1
|
|
}
|
|
|
|
define signext i32 @sext_fptosi(double %a) nounwind {
|
|
; RV64ID-LABEL: sext_fptosi:
|
|
; RV64ID: # %bb.0:
|
|
; RV64ID-NEXT: fcvt.w.d a0, fa0, rtz
|
|
; RV64ID-NEXT: ret
|
|
;
|
|
; RV64IDINX-LABEL: sext_fptosi:
|
|
; RV64IDINX: # %bb.0:
|
|
; RV64IDINX-NEXT: fcvt.w.d a0, a0, rtz
|
|
; RV64IDINX-NEXT: ret
|
|
%1 = fptosi double %a to i32
|
|
ret i32 %1
|
|
}
|
|
|
|
define zeroext i32 @zext_fptosi(double %a) nounwind {
|
|
; RV64ID-LABEL: zext_fptosi:
|
|
; RV64ID: # %bb.0:
|
|
; RV64ID-NEXT: fcvt.w.d a0, fa0, rtz
|
|
; RV64ID-NEXT: slli a0, a0, 32
|
|
; RV64ID-NEXT: srli a0, a0, 32
|
|
; RV64ID-NEXT: ret
|
|
;
|
|
; RV64IDINX-LABEL: zext_fptosi:
|
|
; RV64IDINX: # %bb.0:
|
|
; RV64IDINX-NEXT: fcvt.w.d a0, a0, rtz
|
|
; RV64IDINX-NEXT: slli a0, a0, 32
|
|
; RV64IDINX-NEXT: srli a0, a0, 32
|
|
; RV64IDINX-NEXT: ret
|
|
%1 = fptosi double %a to i32
|
|
ret i32 %1
|
|
}
|
|
|
|
define i32 @aext_fptoui(double %a) nounwind {
|
|
; RV64ID-LABEL: aext_fptoui:
|
|
; RV64ID: # %bb.0:
|
|
; RV64ID-NEXT: fcvt.wu.d a0, fa0, rtz
|
|
; RV64ID-NEXT: ret
|
|
;
|
|
; RV64IDINX-LABEL: aext_fptoui:
|
|
; RV64IDINX: # %bb.0:
|
|
; RV64IDINX-NEXT: fcvt.wu.d a0, a0, rtz
|
|
; RV64IDINX-NEXT: ret
|
|
%1 = fptoui double %a to i32
|
|
ret i32 %1
|
|
}
|
|
|
|
define signext i32 @sext_fptoui(double %a) nounwind {
|
|
; RV64ID-LABEL: sext_fptoui:
|
|
; RV64ID: # %bb.0:
|
|
; RV64ID-NEXT: fcvt.wu.d a0, fa0, rtz
|
|
; RV64ID-NEXT: ret
|
|
;
|
|
; RV64IDINX-LABEL: sext_fptoui:
|
|
; RV64IDINX: # %bb.0:
|
|
; RV64IDINX-NEXT: fcvt.wu.d a0, a0, rtz
|
|
; RV64IDINX-NEXT: ret
|
|
%1 = fptoui double %a to i32
|
|
ret i32 %1
|
|
}
|
|
|
|
define zeroext i32 @zext_fptoui(double %a) nounwind {
|
|
; RV64ID-LABEL: zext_fptoui:
|
|
; RV64ID: # %bb.0:
|
|
; RV64ID-NEXT: fcvt.lu.d a0, fa0, rtz
|
|
; RV64ID-NEXT: ret
|
|
;
|
|
; RV64IDINX-LABEL: zext_fptoui:
|
|
; RV64IDINX: # %bb.0:
|
|
; RV64IDINX-NEXT: fcvt.lu.d a0, a0, rtz
|
|
; RV64IDINX-NEXT: ret
|
|
%1 = fptoui double %a to i32
|
|
ret i32 %1
|
|
}
|
|
|
|
define double @uitofp_aext_i32_to_f64(i32 %a) nounwind {
|
|
; RV64ID-LABEL: uitofp_aext_i32_to_f64:
|
|
; RV64ID: # %bb.0:
|
|
; RV64ID-NEXT: fcvt.d.wu fa0, a0
|
|
; RV64ID-NEXT: ret
|
|
;
|
|
; RV64IDINX-LABEL: uitofp_aext_i32_to_f64:
|
|
; RV64IDINX: # %bb.0:
|
|
; RV64IDINX-NEXT: fcvt.d.wu a0, a0
|
|
; RV64IDINX-NEXT: ret
|
|
%1 = uitofp i32 %a to double
|
|
ret double %1
|
|
}
|
|
|
|
define double @uitofp_sext_i32_to_f64(i32 signext %a) nounwind {
|
|
; RV64ID-LABEL: uitofp_sext_i32_to_f64:
|
|
; RV64ID: # %bb.0:
|
|
; RV64ID-NEXT: fcvt.d.wu fa0, a0
|
|
; RV64ID-NEXT: ret
|
|
;
|
|
; RV64IDINX-LABEL: uitofp_sext_i32_to_f64:
|
|
; RV64IDINX: # %bb.0:
|
|
; RV64IDINX-NEXT: fcvt.d.wu a0, a0
|
|
; RV64IDINX-NEXT: ret
|
|
%1 = uitofp i32 %a to double
|
|
ret double %1
|
|
}
|
|
|
|
define double @uitofp_zext_i32_to_f64(i32 zeroext %a) nounwind {
|
|
; RV64ID-LABEL: uitofp_zext_i32_to_f64:
|
|
; RV64ID: # %bb.0:
|
|
; RV64ID-NEXT: fcvt.d.wu fa0, a0
|
|
; RV64ID-NEXT: ret
|
|
;
|
|
; RV64IDINX-LABEL: uitofp_zext_i32_to_f64:
|
|
; RV64IDINX: # %bb.0:
|
|
; RV64IDINX-NEXT: fcvt.d.wu a0, a0
|
|
; RV64IDINX-NEXT: ret
|
|
%1 = uitofp i32 %a to double
|
|
ret double %1
|
|
}
|
|
|
|
define double @sitofp_aext_i32_to_f64(i32 %a) nounwind {
|
|
; RV64ID-LABEL: sitofp_aext_i32_to_f64:
|
|
; RV64ID: # %bb.0:
|
|
; RV64ID-NEXT: fcvt.d.w fa0, a0
|
|
; RV64ID-NEXT: ret
|
|
;
|
|
; RV64IDINX-LABEL: sitofp_aext_i32_to_f64:
|
|
; RV64IDINX: # %bb.0:
|
|
; RV64IDINX-NEXT: fcvt.d.w a0, a0
|
|
; RV64IDINX-NEXT: ret
|
|
%1 = sitofp i32 %a to double
|
|
ret double %1
|
|
}
|
|
|
|
define double @sitofp_sext_i32_to_f64(i32 signext %a) nounwind {
|
|
; RV64ID-LABEL: sitofp_sext_i32_to_f64:
|
|
; RV64ID: # %bb.0:
|
|
; RV64ID-NEXT: fcvt.d.w fa0, a0
|
|
; RV64ID-NEXT: ret
|
|
;
|
|
; RV64IDINX-LABEL: sitofp_sext_i32_to_f64:
|
|
; RV64IDINX: # %bb.0:
|
|
; RV64IDINX-NEXT: fcvt.d.w a0, a0
|
|
; RV64IDINX-NEXT: ret
|
|
%1 = sitofp i32 %a to double
|
|
ret double %1
|
|
}
|
|
|
|
define double @sitofp_zext_i32_to_f64(i32 zeroext %a) nounwind {
|
|
; RV64ID-LABEL: sitofp_zext_i32_to_f64:
|
|
; RV64ID: # %bb.0:
|
|
; RV64ID-NEXT: fcvt.d.w fa0, a0
|
|
; RV64ID-NEXT: ret
|
|
;
|
|
; RV64IDINX-LABEL: sitofp_zext_i32_to_f64:
|
|
; RV64IDINX: # %bb.0:
|
|
; RV64IDINX-NEXT: fcvt.d.w a0, a0
|
|
; RV64IDINX-NEXT: ret
|
|
%1 = sitofp i32 %a to double
|
|
ret double %1
|
|
}
|