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
176 lines
6.4 KiB
LLVM
176 lines
6.4 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=riscv32 -target-abi=ilp32d -mattr=+v,+zfbfmin,+zvfbfmin -verify-machineinstrs < %s | FileCheck %s --check-prefixes=ZFBFMIN-ZVFBFMIN
|
|
; RUN: llc -mtriple=riscv32 -target-abi=ilp32d -mattr=+v,+zvfbfmin -verify-machineinstrs < %s | FileCheck %s --check-prefixes=ZVFBFMIN
|
|
; RUN: llc -mtriple=riscv64 -target-abi=lp64d -mattr=+v,+zfbfmin,+zvfbfmin -verify-machineinstrs < %s | FileCheck %s --check-prefixes=ZFBFMIN-ZVFBFMIN
|
|
; RUN: llc -mtriple=riscv64 -target-abi=lp64d -mattr=+v,+zvfbfmin -verify-machineinstrs < %s | FileCheck %s --check-prefixes=ZVFBFMIN
|
|
; RUN: llc -mtriple=riscv32 -target-abi=ilp32d -mattr=+v,+experimental-zvfbfa -verify-machineinstrs < %s | FileCheck %s --check-prefixes=ZVFBFA
|
|
; RUN: llc -mtriple=riscv64 -target-abi=lp64d -mattr=+v,+experimental-zvfbfa -verify-machineinstrs < %s | FileCheck %s --check-prefixes=ZVFBFA
|
|
|
|
define <8 x bfloat> @splat_v8bf16(ptr %x, bfloat %y) {
|
|
; ZFBFMIN-ZVFBFMIN-LABEL: splat_v8bf16:
|
|
; ZFBFMIN-ZVFBFMIN: # %bb.0:
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: fmv.x.h a0, fa0
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vmv.v.x v8, a0
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: splat_v8bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: fmv.x.w a0, fa0
|
|
; ZVFBFMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
|
|
; ZVFBFMIN-NEXT: vmv.v.x v8, a0
|
|
; ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFA-LABEL: splat_v8bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: vsetivli zero, 8, e16alt, m1, ta, ma
|
|
; ZVFBFA-NEXT: vfmv.v.f v8, fa0
|
|
; ZVFBFA-NEXT: ret
|
|
%a = insertelement <8 x bfloat> poison, bfloat %y, i32 0
|
|
%b = shufflevector <8 x bfloat> %a, <8 x bfloat> poison, <8 x i32> zeroinitializer
|
|
ret <8 x bfloat> %b
|
|
}
|
|
|
|
define <16 x bfloat> @splat_16bf16(ptr %x, bfloat %y) {
|
|
; ZFBFMIN-ZVFBFMIN-LABEL: splat_16bf16:
|
|
; ZFBFMIN-ZVFBFMIN: # %bb.0:
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: fmv.x.h a0, fa0
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vmv.v.x v8, a0
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: splat_16bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: fmv.x.w a0, fa0
|
|
; ZVFBFMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
|
|
; ZVFBFMIN-NEXT: vmv.v.x v8, a0
|
|
; ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFA-LABEL: splat_16bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: vsetivli zero, 16, e16alt, m2, ta, ma
|
|
; ZVFBFA-NEXT: vfmv.v.f v8, fa0
|
|
; ZVFBFA-NEXT: ret
|
|
%a = insertelement <16 x bfloat> poison, bfloat %y, i32 0
|
|
%b = shufflevector <16 x bfloat> %a, <16 x bfloat> poison, <16 x i32> zeroinitializer
|
|
ret <16 x bfloat> %b
|
|
}
|
|
|
|
define <64 x bfloat> @splat_64bf16(ptr %x, bfloat %y) {
|
|
; ZFBFMIN-ZVFBFMIN-LABEL: splat_64bf16:
|
|
; ZFBFMIN-ZVFBFMIN: # %bb.0:
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: fmv.x.h a0, fa0
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: li a1, 64
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vsetvli zero, a1, e16, m8, ta, ma
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vmv.v.x v8, a0
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: splat_64bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: fmv.x.w a0, fa0
|
|
; ZVFBFMIN-NEXT: li a1, 64
|
|
; ZVFBFMIN-NEXT: vsetvli zero, a1, e16, m8, ta, ma
|
|
; ZVFBFMIN-NEXT: vmv.v.x v8, a0
|
|
; ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFA-LABEL: splat_64bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: li a0, 64
|
|
; ZVFBFA-NEXT: vsetvli zero, a0, e16alt, m8, ta, ma
|
|
; ZVFBFA-NEXT: vfmv.v.f v8, fa0
|
|
; ZVFBFA-NEXT: ret
|
|
%a = insertelement <64 x bfloat> poison, bfloat %y, i32 0
|
|
%b = shufflevector <64 x bfloat> %a, <64 x bfloat> poison, <64 x i32> zeroinitializer
|
|
ret <64 x bfloat> %b
|
|
}
|
|
|
|
define <8 x bfloat> @splat_zero_v8bf16(ptr %x) {
|
|
; ZFBFMIN-ZVFBFMIN-LABEL: splat_zero_v8bf16:
|
|
; ZFBFMIN-ZVFBFMIN: # %bb.0:
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vmv.v.i v8, 0
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: splat_zero_v8bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
|
|
; ZVFBFMIN-NEXT: vmv.v.i v8, 0
|
|
; ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFA-LABEL: splat_zero_v8bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: vsetivli zero, 8, e16, m1, ta, ma
|
|
; ZVFBFA-NEXT: vmv.v.i v8, 0
|
|
; ZVFBFA-NEXT: ret
|
|
ret <8 x bfloat> splat (bfloat 0.0)
|
|
}
|
|
|
|
define <16 x bfloat> @splat_zero_16bf16(ptr %x) {
|
|
; ZFBFMIN-ZVFBFMIN-LABEL: splat_zero_16bf16:
|
|
; ZFBFMIN-ZVFBFMIN: # %bb.0:
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vmv.v.i v8, 0
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: splat_zero_16bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
|
|
; ZVFBFMIN-NEXT: vmv.v.i v8, 0
|
|
; ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFA-LABEL: splat_zero_16bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: vsetivli zero, 16, e16, m2, ta, ma
|
|
; ZVFBFA-NEXT: vmv.v.i v8, 0
|
|
; ZVFBFA-NEXT: ret
|
|
ret <16 x bfloat> splat (bfloat 0.0)
|
|
}
|
|
|
|
define <8 x bfloat> @splat_negzero_v8bf16(ptr %x) {
|
|
; ZFBFMIN-ZVFBFMIN-LABEL: splat_negzero_v8bf16:
|
|
; ZFBFMIN-ZVFBFMIN: # %bb.0:
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: lui a0, 1048568
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vmv.v.x v8, a0
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: splat_negzero_v8bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: lui a0, 1048568
|
|
; ZVFBFMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
|
|
; ZVFBFMIN-NEXT: vmv.v.x v8, a0
|
|
; ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFA-LABEL: splat_negzero_v8bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: lui a0, 1048568
|
|
; ZVFBFA-NEXT: vsetivli zero, 8, e16, m1, ta, ma
|
|
; ZVFBFA-NEXT: vmv.v.x v8, a0
|
|
; ZVFBFA-NEXT: ret
|
|
ret <8 x bfloat> splat (bfloat -0.0)
|
|
}
|
|
|
|
define <16 x bfloat> @splat_negzero_16bf16(ptr %x) {
|
|
; ZFBFMIN-ZVFBFMIN-LABEL: splat_negzero_16bf16:
|
|
; ZFBFMIN-ZVFBFMIN: # %bb.0:
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: lui a0, 1048568
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: vmv.v.x v8, a0
|
|
; ZFBFMIN-ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: splat_negzero_16bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: lui a0, 1048568
|
|
; ZVFBFMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
|
|
; ZVFBFMIN-NEXT: vmv.v.x v8, a0
|
|
; ZVFBFMIN-NEXT: ret
|
|
;
|
|
; ZVFBFA-LABEL: splat_negzero_16bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: lui a0, 1048568
|
|
; ZVFBFA-NEXT: vsetivli zero, 16, e16, m2, ta, ma
|
|
; ZVFBFA-NEXT: vmv.v.x v8, a0
|
|
; ZVFBFA-NEXT: ret
|
|
ret <16 x bfloat> splat (bfloat -0.0)
|
|
}
|