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
206 lines
6.2 KiB
LLVM
206 lines
6.2 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=riscv32 -mattr=+v,+zvfhmin,+experimental-zvfbfa \
|
|
; RUN: -target-abi=ilp32d -verify-machineinstrs < %s \
|
|
; RUN: | FileCheck %s --check-prefixes=CHECK,ZVFBFA
|
|
; RUN: llc -mtriple=riscv64 -mattr=+v,+zvfhmin,+experimental-zvfbfa \
|
|
; RUN: -target-abi=lp64d -verify-machineinstrs < %s \
|
|
; RUN: | FileCheck %s --check-prefixes=CHECK,ZVFBFA
|
|
; RUN: llc -mtriple=riscv32 -mattr=+v,+zvfhmin,+zvfbfmin -target-abi=ilp32d \
|
|
; RUN: -verify-machineinstrs < %s \
|
|
; RUN: | FileCheck %s --check-prefixes=CHECK,ZVFBFMIN
|
|
; RUN: llc -mtriple=riscv64 -mattr=+v,+zvfhmin,+zvfbfmin -target-abi=lp64d \
|
|
; RUN: -verify-machineinstrs < %s \
|
|
; RUN: | FileCheck %s --check-prefixes=CHECK,ZVFBFMIN
|
|
|
|
define <1 x bfloat> @v1bf16(<1 x bfloat> %v) {
|
|
; ZVFBFA-LABEL: v1bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: vsetivli zero, 1, e16alt, mf4, ta, ma
|
|
; ZVFBFA-NEXT: vfabs.v v8, v8
|
|
; ZVFBFA-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: v1bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: lui a0, 8
|
|
; ZVFBFMIN-NEXT: addi a0, a0, -1
|
|
; ZVFBFMIN-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
|
|
; ZVFBFMIN-NEXT: vand.vx v8, v8, a0
|
|
; ZVFBFMIN-NEXT: ret
|
|
%r = call <1 x bfloat> @llvm.fabs.v1bf16(<1 x bfloat> %v)
|
|
ret <1 x bfloat> %r
|
|
}
|
|
|
|
define <2 x bfloat> @v2bf16(<2 x bfloat> %v) {
|
|
; ZVFBFA-LABEL: v2bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: vsetivli zero, 2, e16alt, mf4, ta, ma
|
|
; ZVFBFA-NEXT: vfabs.v v8, v8
|
|
; ZVFBFA-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: v2bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: lui a0, 8
|
|
; ZVFBFMIN-NEXT: addi a0, a0, -1
|
|
; ZVFBFMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
|
|
; ZVFBFMIN-NEXT: vand.vx v8, v8, a0
|
|
; ZVFBFMIN-NEXT: ret
|
|
%r = call <2 x bfloat> @llvm.fabs.v2bf16(<2 x bfloat> %v)
|
|
ret <2 x bfloat> %r
|
|
}
|
|
|
|
define <4 x bfloat> @v4bf16(<4 x bfloat> %v) {
|
|
; ZVFBFA-LABEL: v4bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: vsetivli zero, 4, e16alt, mf2, ta, ma
|
|
; ZVFBFA-NEXT: vfabs.v v8, v8
|
|
; ZVFBFA-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: v4bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: lui a0, 8
|
|
; ZVFBFMIN-NEXT: addi a0, a0, -1
|
|
; ZVFBFMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
|
|
; ZVFBFMIN-NEXT: vand.vx v8, v8, a0
|
|
; ZVFBFMIN-NEXT: ret
|
|
%r = call <4 x bfloat> @llvm.fabs.v4bf16(<4 x bfloat> %v)
|
|
ret <4 x bfloat> %r
|
|
}
|
|
|
|
define <8 x bfloat> @v8bf16(<8 x bfloat> %v) {
|
|
; ZVFBFA-LABEL: v8bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: vsetivli zero, 8, e16alt, m1, ta, ma
|
|
; ZVFBFA-NEXT: vfabs.v v8, v8
|
|
; ZVFBFA-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: v8bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: lui a0, 8
|
|
; ZVFBFMIN-NEXT: addi a0, a0, -1
|
|
; ZVFBFMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
|
|
; ZVFBFMIN-NEXT: vand.vx v8, v8, a0
|
|
; ZVFBFMIN-NEXT: ret
|
|
%r = call <8 x bfloat> @llvm.fabs.v8bf16(<8 x bfloat> %v)
|
|
ret <8 x bfloat> %r
|
|
}
|
|
|
|
define <16 x bfloat> @v16bf16(<16 x bfloat> %v) {
|
|
; ZVFBFA-LABEL: v16bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: vsetivli zero, 16, e16alt, m2, ta, ma
|
|
; ZVFBFA-NEXT: vfabs.v v8, v8
|
|
; ZVFBFA-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: v16bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: lui a0, 8
|
|
; ZVFBFMIN-NEXT: addi a0, a0, -1
|
|
; ZVFBFMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
|
|
; ZVFBFMIN-NEXT: vand.vx v8, v8, a0
|
|
; ZVFBFMIN-NEXT: ret
|
|
%r = call <16 x bfloat> @llvm.fabs.v16bf16(<16 x bfloat> %v)
|
|
ret <16 x bfloat> %r
|
|
}
|
|
|
|
define <32 x bfloat> @v32bf16(<32 x bfloat> %v) {
|
|
; ZVFBFA-LABEL: v32bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: li a0, 32
|
|
; ZVFBFA-NEXT: vsetvli zero, a0, e16alt, m4, ta, ma
|
|
; ZVFBFA-NEXT: vfabs.v v8, v8
|
|
; ZVFBFA-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: v32bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: lui a0, 8
|
|
; ZVFBFMIN-NEXT: addi a0, a0, -1
|
|
; ZVFBFMIN-NEXT: li a1, 32
|
|
; ZVFBFMIN-NEXT: vsetvli zero, a1, e16, m4, ta, ma
|
|
; ZVFBFMIN-NEXT: vand.vx v8, v8, a0
|
|
; ZVFBFMIN-NEXT: ret
|
|
%r = call <32 x bfloat> @llvm.fabs.v32bf16(<32 x bfloat> %v)
|
|
ret <32 x bfloat> %r
|
|
}
|
|
|
|
define <64 x bfloat> @v64bf16(<64 x bfloat> %v) {
|
|
; ZVFBFA-LABEL: v64bf16:
|
|
; ZVFBFA: # %bb.0:
|
|
; ZVFBFA-NEXT: li a0, 64
|
|
; ZVFBFA-NEXT: vsetvli zero, a0, e16alt, m8, ta, ma
|
|
; ZVFBFA-NEXT: vfabs.v v8, v8
|
|
; ZVFBFA-NEXT: ret
|
|
;
|
|
; ZVFBFMIN-LABEL: v64bf16:
|
|
; ZVFBFMIN: # %bb.0:
|
|
; ZVFBFMIN-NEXT: lui a0, 8
|
|
; ZVFBFMIN-NEXT: addi a0, a0, -1
|
|
; ZVFBFMIN-NEXT: li a1, 64
|
|
; ZVFBFMIN-NEXT: vsetvli zero, a1, e16, m8, ta, ma
|
|
; ZVFBFMIN-NEXT: vand.vx v8, v8, a0
|
|
; ZVFBFMIN-NEXT: ret
|
|
%r = call <64 x bfloat> @llvm.fabs.v64bf16(<64 x bfloat> %v)
|
|
ret <64 x bfloat> %r
|
|
}
|
|
|
|
define <1 x half> @v1f16(<1 x half> %v) {
|
|
; CHECK-LABEL: v1f16:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: lui a0, 8
|
|
; CHECK-NEXT: addi a0, a0, -1
|
|
; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
|
|
; CHECK-NEXT: vand.vx v8, v8, a0
|
|
; CHECK-NEXT: ret
|
|
%r = call <1 x half> @llvm.fabs.v1f16(<1 x half> %v)
|
|
ret <1 x half> %r
|
|
}
|
|
|
|
define <2 x half> @v2f16(<2 x half> %v) {
|
|
; CHECK-LABEL: v2f16:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: lui a0, 8
|
|
; CHECK-NEXT: addi a0, a0, -1
|
|
; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
|
|
; CHECK-NEXT: vand.vx v8, v8, a0
|
|
; CHECK-NEXT: ret
|
|
%r = call <2 x half> @llvm.fabs.v2f16(<2 x half> %v)
|
|
ret <2 x half> %r
|
|
}
|
|
|
|
define <8 x half> @v8f16(<8 x half> %v) {
|
|
; CHECK-LABEL: v8f16:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: lui a0, 8
|
|
; CHECK-NEXT: addi a0, a0, -1
|
|
; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
|
|
; CHECK-NEXT: vand.vx v8, v8, a0
|
|
; CHECK-NEXT: ret
|
|
%r = call <8 x half> @llvm.fabs.v8f16(<8 x half> %v)
|
|
ret <8 x half> %r
|
|
}
|
|
|
|
define <32 x half> @v32f16(<32 x half> %v) {
|
|
; CHECK-LABEL: v32f16:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: lui a0, 8
|
|
; CHECK-NEXT: addi a0, a0, -1
|
|
; CHECK-NEXT: li a1, 32
|
|
; CHECK-NEXT: vsetvli zero, a1, e16, m4, ta, ma
|
|
; CHECK-NEXT: vand.vx v8, v8, a0
|
|
; CHECK-NEXT: ret
|
|
%r = call <32 x half> @llvm.fabs.v32f16(<32 x half> %v)
|
|
ret <32 x half> %r
|
|
}
|
|
|
|
define <64 x half> @v64f16(<64 x half> %v) {
|
|
; CHECK-LABEL: v64f16:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: lui a0, 8
|
|
; CHECK-NEXT: addi a0, a0, -1
|
|
; CHECK-NEXT: li a1, 64
|
|
; CHECK-NEXT: vsetvli zero, a1, e16, m8, ta, ma
|
|
; CHECK-NEXT: vand.vx v8, v8, a0
|
|
; CHECK-NEXT: ret
|
|
%r = call <64 x half> @llvm.fabs.v64f16(<64 x half> %v)
|
|
ret <64 x half> %r
|
|
}
|