Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/SystemZ/vec-round-02.ll
T
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

138 lines
3.6 KiB
LLVM

; Test v4f32 rounding on z14.
;
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 | FileCheck %s
declare float @llvm.rint.f32(float)
declare float @llvm.nearbyint.f32(float)
declare float @llvm.floor.f32(float)
declare float @llvm.ceil.f32(float)
declare float @llvm.trunc.f32(float)
declare float @llvm.round.f32(float)
declare float @llvm.roundeven.f32(float)
declare <4 x float> @llvm.rint.v4f32(<4 x float>)
declare <4 x float> @llvm.nearbyint.v4f32(<4 x float>)
declare <4 x float> @llvm.floor.v4f32(<4 x float>)
declare <4 x float> @llvm.ceil.v4f32(<4 x float>)
declare <4 x float> @llvm.trunc.v4f32(<4 x float>)
declare <4 x float> @llvm.round.v4f32(<4 x float>)
declare <4 x float> @llvm.roundeven.v4f32(<4 x float>)
define <4 x float> @f1(<4 x float> %val) {
; CHECK-LABEL: f1:
; CHECK: vfisb %v24, %v24, 0, 0
; CHECK: br %r14
%res = call <4 x float> @llvm.rint.v4f32(<4 x float> %val)
ret <4 x float> %res
}
define <4 x float> @f2(<4 x float> %val) {
; CHECK-LABEL: f2:
; CHECK: vfisb %v24, %v24, 4, 0
; CHECK: br %r14
%res = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %val)
ret <4 x float> %res
}
define <4 x float> @f3(<4 x float> %val) {
; CHECK-LABEL: f3:
; CHECK: vfisb %v24, %v24, 4, 7
; CHECK: br %r14
%res = call <4 x float> @llvm.floor.v4f32(<4 x float> %val)
ret <4 x float> %res
}
define <4 x float> @f4(<4 x float> %val) {
; CHECK-LABEL: f4:
; CHECK: vfisb %v24, %v24, 4, 6
; CHECK: br %r14
%res = call <4 x float> @llvm.ceil.v4f32(<4 x float> %val)
ret <4 x float> %res
}
define <4 x float> @f5(<4 x float> %val) {
; CHECK-LABEL: f5:
; CHECK: vfisb %v24, %v24, 4, 5
; CHECK: br %r14
%res = call <4 x float> @llvm.trunc.v4f32(<4 x float> %val)
ret <4 x float> %res
}
define <4 x float> @f6(<4 x float> %val) {
; CHECK-LABEL: f6:
; CHECK: vfisb %v24, %v24, 4, 1
; CHECK: br %r14
%res = call <4 x float> @llvm.round.v4f32(<4 x float> %val)
ret <4 x float> %res
}
define <4 x float> @f7(<4 x float> %val) {
; CHECK-LABEL: f7:
; CHECK: vfisb %v24, %v24, 4, 4
; CHECK: br %r14
%res = call <4 x float> @llvm.roundeven.v4f32(<4 x float> %val)
ret <4 x float> %res
}
define float @f8(<4 x float> %val) {
; CHECK-LABEL: f8:
; CHECK: wfisb %f0, %v24, 0, 0
; CHECK: br %r14
%scalar = extractelement <4 x float> %val, i32 0
%res = call float @llvm.rint.f32(float %scalar)
ret float %res
}
define float @f9(<4 x float> %val) {
; CHECK-LABEL: f9:
; CHECK: wfisb %f0, %v24, 4, 0
; CHECK: br %r14
%scalar = extractelement <4 x float> %val, i32 0
%res = call float @llvm.nearbyint.f32(float %scalar)
ret float %res
}
define float @f10(<4 x float> %val) {
; CHECK-LABEL: f10:
; CHECK: wfisb %f0, %v24, 4, 7
; CHECK: br %r14
%scalar = extractelement <4 x float> %val, i32 0
%res = call float @llvm.floor.f32(float %scalar)
ret float %res
}
define float @f11(<4 x float> %val) {
; CHECK-LABEL: f11:
; CHECK: wfisb %f0, %v24, 4, 6
; CHECK: br %r14
%scalar = extractelement <4 x float> %val, i32 0
%res = call float @llvm.ceil.f32(float %scalar)
ret float %res
}
define float @f12(<4 x float> %val) {
; CHECK-LABEL: f12:
; CHECK: wfisb %f0, %v24, 4, 5
; CHECK: br %r14
%scalar = extractelement <4 x float> %val, i32 0
%res = call float @llvm.trunc.f32(float %scalar)
ret float %res
}
define float @f13(<4 x float> %val) {
; CHECK-LABEL: f13:
; CHECK: wfisb %f0, %v24, 4, 1
; CHECK: br %r14
%scalar = extractelement <4 x float> %val, i32 0
%res = call float @llvm.round.f32(float %scalar)
ret float %res
}
define float @f14(<4 x float> %val) {
; CHECK-LABEL: f14:
; CHECK: wfisb %f0, %v24, 4, 4
; CHECK: br %r14
%scalar = extractelement <4 x float> %val, i32 0
%res = call float @llvm.roundeven.f32(float %scalar)
ret float %res
}