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
65 lines
1.8 KiB
LLVM
65 lines
1.8 KiB
LLVM
; RUN: llc < %s | FileCheck %s
|
|
|
|
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64--"
|
|
|
|
; CHECK-LABEL: double_rounding_safe:
|
|
; CHECK: callq __trunctfdf2
|
|
; CHECK-NEXT: cvtsd2ss %xmm0
|
|
define void @double_rounding_safe(ptr %x, ptr %f) {
|
|
entry:
|
|
%x.fp128 = load fp128, ptr %x, align 16
|
|
%x.double = fptrunc fp128 %x.fp128 to double
|
|
%x.float = fptrunc double %x.double to float
|
|
store float %x.float, ptr %f, align 4
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: double_rounding_contract_fst:
|
|
; CHECK: callq __trunctfdf2
|
|
; CHECK-NEXT: cvtsd2ss %xmm0
|
|
define void @double_rounding_contract_fst(ptr %x, ptr %f) {
|
|
entry:
|
|
%x.fp128 = load fp128, ptr %x, align 16
|
|
%x.double = fptrunc contract fp128 %x.fp128 to double
|
|
%x.float = fptrunc double %x.double to float
|
|
store float %x.float, ptr %f, align 4
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: double_rounding_contract_snd:
|
|
; CHECK: callq __trunctfdf2
|
|
; CHECK-NEXT: cvtsd2ss %xmm0
|
|
define void @double_rounding_contract_snd(ptr %x, ptr %f) {
|
|
entry:
|
|
%x.fp128 = load fp128, ptr %x, align 16
|
|
%x.double = fptrunc fp128 %x.fp128 to double
|
|
%x.float = fptrunc contract double %x.double to float
|
|
store float %x.float, ptr %f, align 4
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: double_rounding:
|
|
; CHECK: callq __trunctfsf2
|
|
; CHECK-NOT: cvt
|
|
define void @double_rounding(ptr %x, ptr %f) {
|
|
entry:
|
|
%x.fp128 = load fp128, ptr %x, align 16
|
|
%x.double = fptrunc contract fp128 %x.fp128 to double
|
|
%x.float = fptrunc contract double %x.double to float
|
|
store float %x.float, ptr %f, align 4
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: double_rounding_precise_first:
|
|
; CHECK: fstps (%
|
|
; CHECK-NOT: fstpl
|
|
define void @double_rounding_precise_first(ptr %f) {
|
|
entry:
|
|
; Hack, to generate a precise FP_ROUND to double
|
|
%precise = call double asm sideeffect "fld %st(0)", "={st(0)}"()
|
|
%0 = fptrunc double %precise to float
|
|
store float %0, ptr %f, align 4
|
|
ret void
|
|
}
|