Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

96 lines
2.7 KiB
LLVM

; Test conversions between integer and float elements.
;
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
; Test conversion of f64s to signed i64s.
define <2 x i64> @f1(<2 x double> %doubles) {
; CHECK-LABEL: f1:
; CHECK: vcgdb %v24, %v24, 0, 5
; CHECK: br %r14
%dwords = fptosi <2 x double> %doubles to <2 x i64>
ret <2 x i64> %dwords
}
; Test conversion of f64s to unsigned i64s.
define <2 x i64> @f2(<2 x double> %doubles) {
; CHECK-LABEL: f2:
; CHECK: vclgdb %v24, %v24, 0, 5
; CHECK: br %r14
%dwords = fptoui <2 x double> %doubles to <2 x i64>
ret <2 x i64> %dwords
}
; Test conversion of signed i64s to f64s.
define <2 x double> @f3(<2 x i64> %dwords) {
; CHECK-LABEL: f3:
; CHECK: vcdgb %v24, %v24, 0, 0
; CHECK: br %r14
%doubles = sitofp <2 x i64> %dwords to <2 x double>
ret <2 x double> %doubles
}
; Test conversion of unsigned i64s to f64s.
define <2 x double> @f4(<2 x i64> %dwords) {
; CHECK-LABEL: f4:
; CHECK: vcdlgb %v24, %v24, 0, 0
; CHECK: br %r14
%doubles = uitofp <2 x i64> %dwords to <2 x double>
ret <2 x double> %doubles
}
; Test conversion of f64s to signed i32s, which must compile.
define void @f5(<2 x double> %doubles, ptr %ptr) {
%words = fptosi <2 x double> %doubles to <2 x i32>
store <2 x i32> %words, ptr %ptr
ret void
}
; Test conversion of f64s to unsigned i32s, which must compile.
define void @f6(<2 x double> %doubles, ptr %ptr) {
%words = fptoui <2 x double> %doubles to <2 x i32>
store <2 x i32> %words, ptr %ptr
ret void
}
; Test conversion of signed i32s to f64s, which must compile.
define <2 x double> @f7(ptr %ptr) {
%words = load <2 x i32>, ptr %ptr
%doubles = sitofp <2 x i32> %words to <2 x double>
ret <2 x double> %doubles
}
; Test conversion of unsigned i32s to f64s, which must compile.
define <2 x double> @f8(ptr %ptr) {
%words = load <2 x i32>, ptr %ptr
%doubles = uitofp <2 x i32> %words to <2 x double>
ret <2 x double> %doubles
}
; Test conversion of f32s to signed i64s, which must compile.
define <2 x i64> @f9(ptr %ptr) {
%floats = load <2 x float>, ptr %ptr
%dwords = fptosi <2 x float> %floats to <2 x i64>
ret <2 x i64> %dwords
}
; Test conversion of f32s to unsigned i64s, which must compile.
define <2 x i64> @f10(ptr %ptr) {
%floats = load <2 x float>, ptr %ptr
%dwords = fptoui <2 x float> %floats to <2 x i64>
ret <2 x i64> %dwords
}
; Test conversion of signed i64s to f32, which must compile.
define void @f11(<2 x i64> %dwords, ptr %ptr) {
%floats = sitofp <2 x i64> %dwords to <2 x float>
store <2 x float> %floats, ptr %ptr
ret void
}
; Test conversion of unsigned i64s to f32, which must compile.
define void @f12(<2 x i64> %dwords, ptr %ptr) {
%floats = uitofp <2 x i64> %dwords to <2 x float>
store <2 x float> %floats, ptr %ptr
ret void
}