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

102 lines
2.8 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; Test f128 to i128 bitcasts.
;
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 \
; RUN: | FileCheck -check-prefix=Z10 %s
;
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 \
; RUN: | FileCheck -check-prefix=Z14 %s
define i64 @extract_float_hi(ptr %0, ptr %1) {
; Z10-LABEL: extract_float_hi:
; Z10: # %bb.0: # %entry
; Z10-NEXT: ld %f0, 0(%r2)
; Z10-NEXT: ld %f2, 8(%r2)
; Z10-NEXT: ld %f1, 0(%r3)
; Z10-NEXT: ld %f3, 8(%r3)
; Z10-NEXT: axbr %f1, %f0
; Z10-NEXT: lgdr %r2, %f1
; Z10-NEXT: br %r14
;
; Z14-LABEL: extract_float_hi:
; Z14: # %bb.0: # %entry
; Z14-NEXT: vl %v0, 0(%r2), 3
; Z14-NEXT: vl %v1, 0(%r3), 3
; Z14-NEXT: wfaxb %v0, %v0, %v1
; Z14-NEXT: vlgvg %r2, %v0, 0
; Z14-NEXT: br %r14
entry:
%x = load fp128, ptr %0
%y = load fp128, ptr %1
%add = fadd fp128 %x, %y
%2 = bitcast fp128 %add to i128
%u.sroa.0.0.extract.shift = lshr i128 %2, 64
%u.sroa.0.0.extract.trunc = trunc i128 %u.sroa.0.0.extract.shift to i64
ret i64 %u.sroa.0.0.extract.trunc
}
define i64 @extract_float_lo(ptr %0, ptr %1) {
; Z10-LABEL: extract_float_lo:
; Z10: # %bb.0: # %entry
; Z10-NEXT: ld %f0, 0(%r2)
; Z10-NEXT: ld %f2, 8(%r2)
; Z10-NEXT: ld %f1, 0(%r3)
; Z10-NEXT: ld %f3, 8(%r3)
; Z10-NEXT: axbr %f1, %f0
; Z10-NEXT: lgdr %r2, %f3
; Z10-NEXT: br %r14
;
; Z14-LABEL: extract_float_lo:
; Z14: # %bb.0: # %entry
; Z14-NEXT: vl %v0, 0(%r2), 3
; Z14-NEXT: vl %v1, 0(%r3), 3
; Z14-NEXT: wfaxb %v0, %v0, %v1
; Z14-NEXT: vlgvg %r2, %v0, 1
; Z14-NEXT: br %r14
entry:
%x = load fp128, ptr %0
%y = load fp128, ptr %1
%add = fadd fp128 %x, %y
%2 = bitcast fp128 %add to i128
%u.sroa.0.0.extract.trunc = trunc i128 %2 to i64
ret i64 %u.sroa.0.0.extract.trunc
}
define i128 @bitcast_128(ptr %0, ptr %1) {
; Z10-LABEL: bitcast_128:
; Z10: # %bb.0: # %entry
; Z10-NEXT: ld %f0, 0(%r3)
; Z10-NEXT: ld %f2, 8(%r3)
; Z10-NEXT: ld %f1, 0(%r4)
; Z10-NEXT: ld %f3, 8(%r4)
; Z10-NEXT: axbr %f1, %f0
; Z10-NEXT: lgdr %r0, %f3
; Z10-NEXT: lgdr %r1, %f1
; Z10-NEXT: oill %r1, 1
; Z10-NEXT: oill %r0, 3
; Z10-NEXT: stg %r0, 8(%r2)
; Z10-NEXT: stg %r1, 0(%r2)
; Z10-NEXT: br %r14
;
; Z14-LABEL: bitcast_128:
; Z14: # %bb.0: # %entry
; Z14-NEXT: vl %v0, 0(%r3), 3
; Z14-NEXT: vl %v1, 0(%r4), 3
; Z14-NEXT: wfaxb %v0, %v0, %v1
; Z14-NEXT: larl %r1, .LCPI2_0
; Z14-NEXT: vl %v1, 0(%r1), 3
; Z14-NEXT: vo %v0, %v0, %v1
; Z14-NEXT: vst %v0, 0(%r2), 3
; Z14-NEXT: br %r14
entry:
%x = load fp128, ptr %0
%y = load fp128, ptr %1
%add = fadd fp128 %x, %y
%i = bitcast fp128 %add to i128
%hibit = shl i128 1, 64
%i2 = or i128 %i, %hibit
%i3 = or i128 %i2, 3
ret i128 %i3
}