Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/RISCV/rvv/vp-splice-bf16.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

98 lines
4.7 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple riscv64 -mattr=+v,+zfh,+zfbfmin,+experimental-zvfbfa \
; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,NOVLDEP,ZVFH
; RUN: llc -mtriple riscv64 -mattr=+v,+zfh,+zfbfmin,+zvfbfmin \
; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,NOVLDEP,ZVFHMIN
; RUN: llc -mtriple riscv64 -mattr=+v,+zfh,+zfbfmin,+experimental-zvfbfa,+vl-dependent-latency \
; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLDEP,ZVFH
; RUN: llc -mtriple riscv64 -mattr=+v,+zfbfmin,+zvfbfmin,+vl-dependent-latency \
; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLDEP,ZVFHMIN
define <vscale x 2 x bfloat> @test_vp_splice_nxv2bf16(<vscale x 2 x bfloat> %va, <vscale x 2 x bfloat> %vb, i32 zeroext %evla, i32 zeroext %evlb) #0 {
; NOVLDEP-LABEL: test_vp_splice_nxv2bf16:
; NOVLDEP: # %bb.0:
; NOVLDEP-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
; NOVLDEP-NEXT: vslidedown.vi v8, v8, 3
; NOVLDEP-NEXT: addi a0, a0, -3
; NOVLDEP-NEXT: vslideup.vx v8, v9, a0
; NOVLDEP-NEXT: ret
;
; VLDEP-LABEL: test_vp_splice_nxv2bf16:
; VLDEP: # %bb.0:
; VLDEP-NEXT: addi a0, a0, -3
; VLDEP-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
; VLDEP-NEXT: vslidedown.vi v8, v8, 3
; VLDEP-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
; VLDEP-NEXT: vslideup.vx v8, v9, a0
; VLDEP-NEXT: ret
%v = call <vscale x 2 x bfloat> @llvm.experimental.vp.splice.nxv2bf16(<vscale x 2 x bfloat> %va, <vscale x 2 x bfloat> %vb, i32 3, <vscale x 2 x i1> splat (i1 1), i32 %evla, i32 %evlb)
ret <vscale x 2 x bfloat> %v
}
define <vscale x 2 x bfloat> @test_vp_splice_nxv2bf16_negative_offset(<vscale x 2 x bfloat> %va, <vscale x 2 x bfloat> %vb, i32 zeroext %evla, i32 zeroext %evlb) #0 {
; NOVLDEP-LABEL: test_vp_splice_nxv2bf16_negative_offset:
; NOVLDEP: # %bb.0:
; NOVLDEP-NEXT: addi a0, a0, -3
; NOVLDEP-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
; NOVLDEP-NEXT: vslidedown.vx v8, v8, a0
; NOVLDEP-NEXT: vslideup.vi v8, v9, 3
; NOVLDEP-NEXT: ret
;
; VLDEP-LABEL: test_vp_splice_nxv2bf16_negative_offset:
; VLDEP: # %bb.0:
; VLDEP-NEXT: addi a0, a0, -3
; VLDEP-NEXT: vsetivli zero, 3, e16, mf2, ta, ma
; VLDEP-NEXT: vslidedown.vx v8, v8, a0
; VLDEP-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
; VLDEP-NEXT: vslideup.vi v8, v9, 3
; VLDEP-NEXT: ret
%v = call <vscale x 2 x bfloat> @llvm.experimental.vp.splice.nxv2bf16(<vscale x 2 x bfloat> %va, <vscale x 2 x bfloat> %vb, i32 -3, <vscale x 2 x i1> splat (i1 1), i32 %evla, i32 %evlb)
ret <vscale x 2 x bfloat> %v
}
define <vscale x 2 x bfloat> @test_vp_splice_nxv2bf16_masked(<vscale x 2 x bfloat> %va, <vscale x 2 x bfloat> %vb, <vscale x 2 x i1> %mask, i32 zeroext %evla, i32 zeroext %evlb) #0 {
; NOVLDEP-LABEL: test_vp_splice_nxv2bf16_masked:
; NOVLDEP: # %bb.0:
; NOVLDEP-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
; NOVLDEP-NEXT: vslidedown.vi v8, v8, 3, v0.t
; NOVLDEP-NEXT: addi a0, a0, -3
; NOVLDEP-NEXT: vsetvli zero, zero, e16, mf2, ta, mu
; NOVLDEP-NEXT: vslideup.vx v8, v9, a0, v0.t
; NOVLDEP-NEXT: ret
;
; VLDEP-LABEL: test_vp_splice_nxv2bf16_masked:
; VLDEP: # %bb.0:
; VLDEP-NEXT: addi a0, a0, -3
; VLDEP-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
; VLDEP-NEXT: vslidedown.vi v8, v8, 3, v0.t
; VLDEP-NEXT: vsetvli zero, a1, e16, mf2, ta, mu
; VLDEP-NEXT: vslideup.vx v8, v9, a0, v0.t
; VLDEP-NEXT: ret
%v = call <vscale x 2 x bfloat> @llvm.experimental.vp.splice.nxv2bf16(<vscale x 2 x bfloat> %va, <vscale x 2 x bfloat> %vb, i32 3, <vscale x 2 x i1> %mask, i32 %evla, i32 %evlb)
ret <vscale x 2 x bfloat> %v
}
define <vscale x 2 x bfloat> @test_vp_splice_nxv2bf16_with_firstelt(bfloat %first, <vscale x 2 x bfloat> %vb, <vscale x 2 x i1> %mask, i32 zeroext %evl) #0 {
; ZVFH-LABEL: test_vp_splice_nxv2bf16_with_firstelt:
; ZVFH: # %bb.0:
; ZVFH-NEXT: vsetvli zero, a0, e16alt, mf2, ta, ma
; ZVFH-NEXT: vfslide1up.vf v9, v8, fa0, v0.t
; ZVFH-NEXT: vmv1r.v v8, v9
; ZVFH-NEXT: ret
;
; ZVFHMIN-LABEL: test_vp_splice_nxv2bf16_with_firstelt:
; ZVFHMIN: # %bb.0:
; ZVFHMIN-NEXT: fmv.x.h a1, fa0
; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
; ZVFHMIN-NEXT: vslide1up.vx v9, v8, a1, v0.t
; ZVFHMIN-NEXT: vmv1r.v v8, v9
; ZVFHMIN-NEXT: ret
%va = insertelement <vscale x 2 x bfloat> poison, bfloat %first, i32 0
%v = call <vscale x 2 x bfloat> @llvm.experimental.vp.splice.nxv2bf16(<vscale x 2 x bfloat> %va, <vscale x 2 x bfloat> %vb, i32 0, <vscale x 2 x i1> %mask, i32 1, i32 %evl)
ret <vscale x 2 x bfloat> %v
}
attributes #0 = { nounwind vscale_range(2,0) }
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
; CHECK: {{.*}}