Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/SystemZ/fp-half-move.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

84 lines
2.3 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=zEC12 -verify-machineinstrs \
; RUN: | FileCheck %s --check-prefix=NOVEC
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z16 -verify-machineinstrs \
; RUN: | FileCheck %s --check-prefix=VECTOR
;
; Test moves (bitcasts) between i16 and half.
define half @f1(ptr %ptr) {
; NOVEC-LABEL: f1:
; NOVEC: # %bb.0:
; NOVEC-NEXT: lh %r0, 0(%r2)
; NOVEC-NEXT: oill %r0, 255
; NOVEC-NEXT: sllg %r0, %r0, 48
; NOVEC-NEXT: ldgr %f0, %r0
; NOVEC-NEXT: # kill: def $f0h killed $f0h killed $f0d
; NOVEC-NEXT: br %r14
;
; VECTOR-LABEL: f1:
; VECTOR: # %bb.0:
; VECTOR-NEXT: lh %r0, 0(%r2)
; VECTOR-NEXT: oill %r0, 255
; VECTOR-NEXT: vlvgh %v0, %r0, 0
; VECTOR-NEXT: br %r14
%L = load i16, ptr %ptr
%O = or i16 %L, 255
%res = bitcast i16 %O to half
ret half %res
}
define half @f2(i16 %Arg) {
; NOVEC-LABEL: f2:
; NOVEC: # %bb.0:
; NOVEC-NEXT: # kill: def $r2l killed $r2l def $r2d
; NOVEC-NEXT: sllg %r0, %r2, 48
; NOVEC-NEXT: ldgr %f0, %r0
; NOVEC-NEXT: # kill: def $f0h killed $f0h killed $f0d
; NOVEC-NEXT: br %r14
;
; VECTOR-LABEL: f2:
; VECTOR: # %bb.0:
; VECTOR-NEXT: vlvgh %v0, %r2, 0
; VECTOR-NEXT: br %r14
%res = bitcast i16 %Arg to half
ret half %res
}
define void @f3(half %val, ptr %ptr) {
; NOVEC-LABEL: f3:
; NOVEC: # %bb.0:
; NOVEC-NEXT: # kill: def $f0h killed $f0h def $f0d
; NOVEC-NEXT: lgdr %r0, %f0
; NOVEC-NEXT: srlg %r0, %r0, 48
; NOVEC-NEXT: stc %r0, 0(%r2)
; NOVEC-NEXT: br %r14
;
; VECTOR-LABEL: f3:
; VECTOR: # %bb.0:
; VECTOR-NEXT: vlgvh %r0, %v0, 0
; VECTOR-NEXT: stc %r0, 0(%r2)
; VECTOR-NEXT: br %r14
%res = bitcast half %val to i16
%trunc = trunc i16 %res to i8
store i8 %trunc, ptr %ptr
ret void
}
define i16 @f4(half %Arg) {
; NOVEC-LABEL: f4:
; NOVEC: # %bb.0:
; NOVEC-NEXT: # kill: def $f0h killed $f0h def $f0d
; NOVEC-NEXT: lgdr %r0, %f0
; NOVEC-NEXT: srlg %r2, %r0, 48
; NOVEC-NEXT: # kill: def $r2l killed $r2l killed $r2d
; NOVEC-NEXT: br %r14
;
; VECTOR-LABEL: f4:
; VECTOR: # %bb.0:
; VECTOR-NEXT: vlgvh %r2, %v0, 0
; VECTOR-NEXT: br %r14
%res = bitcast half %Arg to i16
ret i16 %res
}