Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/RISCV/rvv/zvfofp8min-alt-interlave.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

244 lines
7.9 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v,+zvfbfmin,+experimental-zvfofp8min \
; RUN: -verify-machineinstrs -target-abi=ilp32d | FileCheck %s
; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+zvfbfmin,+experimental-zvfofp8min \
; RUN: -verify-machineinstrs -target-abi=lp64d | FileCheck %s
; a -> need alt
; n -> don't need alt
; d -> don't care alt
define <vscale x 1 x bfloat> @test_a_n_interleave(<vscale x 1 x bfloat> %0, iXLen %1) nounwind {
; CHECK-LABEL: test_a_n_interleave:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vsetvli zero, a0, e8alt, mf8, ta, ma
; CHECK-NEXT: vfncvtbf16.f.f.w v9, v8
; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
; CHECK-NEXT: vfwcvtbf16.f.f.v v8, v9
; CHECK-NEXT: ret
entry:
%a = call <vscale x 1 x i8> @llvm.riscv.vfncvt.f.f.w.alt.nxv1i8.nxv1bf16(
<vscale x 1 x i8> poison,
<vscale x 1 x bfloat> %0,
iXLen 7, iXLen %1)
%b = call <vscale x 1 x bfloat> @llvm.riscv.vfwcvt.f.f.v.nxv1bf16.nxv1i8(
<vscale x 1 x bfloat> poison,
<vscale x 1 x i8> %a,
iXLen %1)
ret <vscale x 1 x bfloat> %b
}
define <vscale x 1 x i8> @test_a_n_a_interleave(<vscale x 1 x bfloat> %0, iXLen %1) nounwind {
; CHECK-LABEL: test_a_n_a_interleave:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vsetvli zero, a0, e8alt, mf8, ta, ma
; CHECK-NEXT: vfncvtbf16.f.f.w v9, v8
; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
; CHECK-NEXT: vfwcvtbf16.f.f.v v10, v9
; CHECK-NEXT: vsetvli zero, zero, e8alt, mf8, ta, ma
; CHECK-NEXT: vfncvtbf16.f.f.w v8, v10
; CHECK-NEXT: ret
entry:
%a = call <vscale x 1 x i8> @llvm.riscv.vfncvt.f.f.w.alt.nxv1i8.nxv1bf16(
<vscale x 1 x i8> poison,
<vscale x 1 x bfloat> %0,
iXLen 7, iXLen %1)
%b = call <vscale x 1 x bfloat> @llvm.riscv.vfwcvt.f.f.v.nxv1bf16.nxv1i8(
<vscale x 1 x bfloat> poison,
<vscale x 1 x i8> %a,
iXLen %1)
%c = call <vscale x 1 x i8> @llvm.riscv.vfncvt.f.f.w.alt.nxv1i8.nxv1bf16(
<vscale x 1 x i8> poison,
<vscale x 1 x bfloat> %b,
iXLen 7, iXLen %1)
ret <vscale x 1 x i8> %c
}
define <vscale x 1 x i8> @test_a_n_d_interleave(<vscale x 1 x i8> %0, iXLen %1) nounwind {
; CHECK-LABEL: test_a_n_d_interleave:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vsetvli zero, a0, e8alt, mf8, ta, ma
; CHECK-NEXT: vfwcvtbf16.f.f.v v9, v8
; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
; CHECK-NEXT: vfncvtbf16.f.f.w v8, v9
; CHECK-NEXT: vadd.vv v8, v8, v8
; CHECK-NEXT: ret
entry:
%a = call <vscale x 1 x bfloat> @llvm.riscv.vfwcvt.f.f.v.alt.nxv1bf16.nxv1i8(
<vscale x 1 x bfloat> poison,
<vscale x 1 x i8> %0,
iXLen %1)
%b = call <vscale x 1 x i8> @llvm.riscv.vfncvt.f.f.w.nxv1i8.nxv1bf16(
<vscale x 1 x i8> poison,
<vscale x 1 x bfloat> %a,
iXLen 7, iXLen %1)
%c = call <vscale x 1 x i8> @llvm.riscv.vadd.nxv1i8(
<vscale x 1 x i8> poison,
<vscale x 1 x i8> %b,
<vscale x 1 x i8> %b,
iXLen %1)
ret <vscale x 1 x i8> %c
}
define <vscale x 1 x i8> @test_a_n_a_d_interleave(<vscale x 1 x bfloat> %0, iXLen %1) nounwind {
; CHECK-LABEL: test_a_n_a_d_interleave:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vsetvli zero, a0, e8alt, mf8, ta, ma
; CHECK-NEXT: vfncvtbf16.f.f.w v9, v8
; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
; CHECK-NEXT: vfwcvtbf16.f.f.v v8, v9
; CHECK-NEXT: vsetvli zero, zero, e8alt, mf8, ta, ma
; CHECK-NEXT: vfncvtbf16.f.f.w v9, v8
; CHECK-NEXT: vadd.vv v8, v9, v9
; CHECK-NEXT: ret
entry:
%a = call <vscale x 1 x i8> @llvm.riscv.vfncvt.f.f.w.alt.nxv1i8.nxv1bf16(
<vscale x 1 x i8> poison,
<vscale x 1 x bfloat> %0,
iXLen 7, iXLen %1)
%b = call <vscale x 1 x bfloat> @llvm.riscv.vfwcvt.f.f.v.nxv1bf16.nxv1i8(
<vscale x 1 x bfloat> poison,
<vscale x 1 x i8> %a,
iXLen %1)
%c = call <vscale x 1 x i8> @llvm.riscv.vfncvt.f.f.w.alt.nxv1i8.nxv1bf16(
<vscale x 1 x i8> poison,
<vscale x 1 x bfloat> %b,
iXLen 7, iXLen %1)
%d = call <vscale x 1 x i8> @llvm.riscv.vadd.nxv1i8(
<vscale x 1 x i8> poison,
<vscale x 1 x i8> %c,
<vscale x 1 x i8> %c,
iXLen %1)
ret <vscale x 1 x i8> %d
}
define <vscale x 1 x bfloat> @test_n_a_interleave(<vscale x 1 x bfloat> %0, iXLen %1) nounwind {
; CHECK-LABEL: test_n_a_interleave:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
; CHECK-NEXT: vfncvtbf16.f.f.w v9, v8
; CHECK-NEXT: vsetvli zero, zero, e8alt, mf8, ta, ma
; CHECK-NEXT: vfwcvtbf16.f.f.v v8, v9
; CHECK-NEXT: ret
entry:
%a = call <vscale x 1 x i8> @llvm.riscv.vfncvt.f.f.w.nxv1i8.nxv1bf16(
<vscale x 1 x i8> poison,
<vscale x 1 x bfloat> %0,
iXLen 7, iXLen %1)
%b = call <vscale x 1 x bfloat> @llvm.riscv.vfwcvt.f.f.v.alt.nxv1bf16.nxv1i8(
<vscale x 1 x bfloat> poison,
<vscale x 1 x i8> %a,
iXLen %1)
ret <vscale x 1 x bfloat> %b
}
define <vscale x 1 x i8> @test_n_a_n_interleave(<vscale x 1 x bfloat> %0, iXLen %1) nounwind {
; CHECK-LABEL: test_n_a_n_interleave:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
; CHECK-NEXT: vfncvtbf16.f.f.w v9, v8
; CHECK-NEXT: vsetvli zero, zero, e8alt, mf8, ta, ma
; CHECK-NEXT: vfwcvtbf16.f.f.v v10, v9
; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
; CHECK-NEXT: vfncvtbf16.f.f.w v8, v10
; CHECK-NEXT: ret
entry:
%a = call <vscale x 1 x i8> @llvm.riscv.vfncvt.f.f.w.nxv1i8.nxv1bf16(
<vscale x 1 x i8> poison,
<vscale x 1 x bfloat> %0,
iXLen 7, iXLen %1)
%b = call <vscale x 1 x bfloat> @llvm.riscv.vfwcvt.f.f.v.alt.nxv1bf16.nxv1i8(
<vscale x 1 x bfloat> poison,
<vscale x 1 x i8> %a,
iXLen %1)
%c = call <vscale x 1 x i8> @llvm.riscv.vfncvt.f.f.w.nxv1i8.nxv1bf16(
<vscale x 1 x i8> poison,
<vscale x 1 x bfloat> %b,
iXLen 7, iXLen %1)
ret <vscale x 1 x i8> %c
}
define <vscale x 1 x i8> @test_n_a_d_interleave(<vscale x 1 x i8> %0, iXLen %1) nounwind {
; CHECK-LABEL: test_n_a_d_interleave:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
; CHECK-NEXT: vfwcvtbf16.f.f.v v9, v8
; CHECK-NEXT: vsetvli zero, zero, e8alt, mf8, ta, ma
; CHECK-NEXT: vfncvtbf16.f.f.w v8, v9
; CHECK-NEXT: vadd.vv v8, v8, v8
; CHECK-NEXT: ret
entry:
%a = call <vscale x 1 x bfloat> @llvm.riscv.vfwcvt.f.f.v.nxv1bf16.nxv1i8(
<vscale x 1 x bfloat> poison,
<vscale x 1 x i8> %0,
iXLen %1)
%b = call <vscale x 1 x i8> @llvm.riscv.vfncvt.f.f.w.alt.nxv1i8.nxv1bf16(
<vscale x 1 x i8> poison,
<vscale x 1 x bfloat> %a,
iXLen 7, iXLen %1)
%c = call <vscale x 1 x i8> @llvm.riscv.vadd.nxv1i8(
<vscale x 1 x i8> poison,
<vscale x 1 x i8> %b,
<vscale x 1 x i8> %b,
iXLen %1)
ret <vscale x 1 x i8> %c
}
define <vscale x 1 x i8> @test_n_a_n_d_interleave(<vscale x 1 x bfloat> %0, iXLen %1) nounwind {
; CHECK-LABEL: test_n_a_n_d_interleave:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
; CHECK-NEXT: vfncvtbf16.f.f.w v9, v8
; CHECK-NEXT: vsetvli zero, zero, e8alt, mf8, ta, ma
; CHECK-NEXT: vfwcvtbf16.f.f.v v8, v9
; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
; CHECK-NEXT: vfncvtbf16.f.f.w v9, v8
; CHECK-NEXT: vadd.vv v8, v9, v9
; CHECK-NEXT: ret
entry:
%a = call <vscale x 1 x i8> @llvm.riscv.vfncvt.f.f.w.nxv1i8.nxv1bf16(
<vscale x 1 x i8> poison,
<vscale x 1 x bfloat> %0,
iXLen 7, iXLen %1)
%b = call <vscale x 1 x bfloat> @llvm.riscv.vfwcvt.f.f.v.alt.nxv1bf16.nxv1i8(
<vscale x 1 x bfloat> poison,
<vscale x 1 x i8> %a,
iXLen %1)
%c = call <vscale x 1 x i8> @llvm.riscv.vfncvt.f.f.w.nxv1i8.nxv1bf16(
<vscale x 1 x i8> poison,
<vscale x 1 x bfloat> %b,
iXLen 7, iXLen %1)
%d = call <vscale x 1 x i8> @llvm.riscv.vadd.nxv1i8(
<vscale x 1 x i8> poison,
<vscale x 1 x i8> %c,
<vscale x 1 x i8> %c,
iXLen %1)
ret <vscale x 1 x i8> %d
}