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
90 lines
2.5 KiB
LLVM
90 lines
2.5 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; Test conversion of floating-point values to unsigned i64s (z10 only).
|
|
;
|
|
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s
|
|
|
|
; z10 doesn't have native support for unsigned fp-to-i64 conversions;
|
|
; they were added in z196 as the Convert to Logical family of instructions.
|
|
; Convert via signed i64s instead.
|
|
|
|
; Test f16->i64. Converted to signed as the max float value is smaller than
|
|
; the signed integer range.
|
|
define i64 @f0(half %f) {
|
|
; CHECK-LABEL: f0:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: stmg %r14, %r15, 112(%r15)
|
|
; CHECK-NEXT: .cfi_offset %r14, -48
|
|
; CHECK-NEXT: .cfi_offset %r15, -40
|
|
; CHECK-NEXT: aghi %r15, -160
|
|
; CHECK-NEXT: .cfi_def_cfa_offset 320
|
|
; CHECK-NEXT: brasl %r14, __extendhfsf2@PLT
|
|
; CHECK-NEXT: cgebr %r2, 5, %f0
|
|
; CHECK-NEXT: lmg %r14, %r15, 272(%r15)
|
|
; CHECK-NEXT: br %r14
|
|
%conv = fptoui half %f to i64
|
|
ret i64 %conv
|
|
}
|
|
|
|
; Test f32->i64.
|
|
define i64 @f1(float %f) {
|
|
; CHECK-LABEL: f1:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: larl %r1, .LCPI1_0
|
|
; CHECK-NEXT: le %f1, 0(%r1)
|
|
; CHECK-NEXT: cebr %f0, %f1
|
|
; CHECK-NEXT: jnl .LBB1_2
|
|
; CHECK-NEXT: # %bb.1:
|
|
; CHECK-NEXT: cgebr %r2, 5, %f0
|
|
; CHECK-NEXT: br %r14
|
|
; CHECK-NEXT: .LBB1_2:
|
|
; CHECK-NEXT: sebr %f0, %f1
|
|
; CHECK-NEXT: cgebr %r2, 5, %f0
|
|
; CHECK-NEXT: xihf %r2, 2147483648
|
|
; CHECK-NEXT: br %r14
|
|
%conv = fptoui float %f to i64
|
|
ret i64 %conv
|
|
}
|
|
|
|
; Test f64->i64.
|
|
define i64 @f2(double %f) {
|
|
; CHECK-LABEL: f2:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: larl %r1, .LCPI2_0
|
|
; CHECK-NEXT: ld %f1, 0(%r1)
|
|
; CHECK-NEXT: cdbr %f0, %f1
|
|
; CHECK-NEXT: jnl .LBB2_2
|
|
; CHECK-NEXT: # %bb.1:
|
|
; CHECK-NEXT: cgdbr %r2, 5, %f0
|
|
; CHECK-NEXT: br %r14
|
|
; CHECK-NEXT: .LBB2_2:
|
|
; CHECK-NEXT: sdbr %f0, %f1
|
|
; CHECK-NEXT: cgdbr %r2, 5, %f0
|
|
; CHECK-NEXT: xihf %r2, 2147483648
|
|
; CHECK-NEXT: br %r14
|
|
%conv = fptoui double %f to i64
|
|
ret i64 %conv
|
|
}
|
|
|
|
; Test f128->i64.
|
|
define i64 @f3(ptr %src) {
|
|
; CHECK-LABEL: f3:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: ld %f0, 0(%r2)
|
|
; CHECK-NEXT: ld %f2, 8(%r2)
|
|
; CHECK-NEXT: larl %r1, .LCPI3_0
|
|
; CHECK-NEXT: lxeb %f1, 0(%r1)
|
|
; CHECK-NEXT: cxbr %f0, %f1
|
|
; CHECK-NEXT: jnl .LBB3_2
|
|
; CHECK-NEXT: # %bb.1:
|
|
; CHECK-NEXT: cgxbr %r2, 5, %f0
|
|
; CHECK-NEXT: br %r14
|
|
; CHECK-NEXT: .LBB3_2:
|
|
; CHECK-NEXT: sxbr %f0, %f1
|
|
; CHECK-NEXT: cgxbr %r2, 5, %f0
|
|
; CHECK-NEXT: xihf %r2, 2147483648
|
|
; CHECK-NEXT: br %r14
|
|
%f = load fp128, ptr %src
|
|
%conv = fptoui fp128 %f to i64
|
|
ret i64 %conv
|
|
}
|