|
1 | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2 |
| -; RUN: llc -mtriple=riscv32 -mattr=+m,+v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLA,RV32VLA |
3 |
| -; RUN: llc -mtriple=riscv64 -mattr=+m,+v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLA,RV64VLA |
| 2 | +; RUN: llc -mtriple=riscv32 -mattr=+m,+v,+zvfhmin,+zvfbfmin -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLA,RV32VLA |
| 3 | +; RUN: llc -mtriple=riscv64 -mattr=+m,+v,+zvfhmin,+zvfbfmin -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLA,RV64VLA |
| 4 | +; RUN: llc -mtriple=riscv32 -mattr=+m,+v,+zvfh,+zvfbfmin -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLA,RV32VLA |
| 5 | +; RUN: llc -mtriple=riscv64 -mattr=+m,+v,+zvfh,+zvfbfmin -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLA,RV64VLA |
4 | 6 |
|
5 |
| -; RUN: llc -mtriple=riscv32 -mattr=+m,+v -early-live-intervals -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLA,RV32VLA |
6 |
| -; RUN: llc -mtriple=riscv64 -mattr=+m,+v -early-live-intervals -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLA,RV64VLA |
| 7 | +; RUN: llc -mtriple=riscv32 -mattr=+m,+v,+zvfhmin,+zvfbfmin -early-live-intervals -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLA,RV32VLA |
| 8 | +; RUN: llc -mtriple=riscv64 -mattr=+m,+v,+zvfhmin,+zvfbfmin -early-live-intervals -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLA,RV64VLA |
| 9 | +; RUN: llc -mtriple=riscv32 -mattr=+m,+v,+zvfh,+zvfbfmin -early-live-intervals -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLA,RV32VLA |
| 10 | +; RUN: llc -mtriple=riscv64 -mattr=+m,+v,+zvfh,+zvfbfmin -early-live-intervals -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,VLA,RV64VLA |
7 | 11 |
|
8 |
| -; RUN: llc < %s -mtriple=riscv32 -mattr=+m,+v -riscv-v-vector-bits-max=128 -verify-machineinstrs | FileCheck -check-prefixes=CHECK,VLS,RV32VLS %s |
9 |
| -; RUN: llc < %s -mtriple=riscv64 -mattr=+m,v -riscv-v-vector-bits-max=128 -verify-machineinstrs | FileCheck -check-prefixes=CHECK,VLS,RV64VLS %s |
| 12 | +; RUN: llc < %s -mtriple=riscv32 -mattr=+m,+v,+zvfhmin,+zvfbfmin -riscv-v-vector-bits-max=128 -verify-machineinstrs | FileCheck -check-prefixes=CHECK,VLS,RV32VLS %s |
| 13 | +; RUN: llc < %s -mtriple=riscv64 -mattr=+m,+v,+zvfhmin,+zvfbfmin -riscv-v-vector-bits-max=128 -verify-machineinstrs | FileCheck -check-prefixes=CHECK,VLS,RV64VLS %s |
| 14 | +; RUN: llc < %s -mtriple=riscv32 -mattr=+m,+v,+zvfh,+zvfbfmin -riscv-v-vector-bits-max=128 -verify-machineinstrs | FileCheck -check-prefixes=CHECK,VLS,RV32VLS %s |
| 15 | +; RUN: llc < %s -mtriple=riscv64 -mattr=+m,+v,+zvfh,+zvfbfmin -riscv-v-vector-bits-max=128 -verify-machineinstrs | FileCheck -check-prefixes=CHECK,VLS,RV64VLS %s |
10 | 16 |
|
11 | 17 | define <vscale x 8 x i32> @insert_nxv8i32_v2i32_0(<vscale x 8 x i32> %vec, ptr %svp) {
|
12 | 18 | ; VLA-LABEL: insert_nxv8i32_v2i32_0:
|
@@ -860,6 +866,90 @@ define void @insert_v2i64_nxv16i64_hi(ptr %psv, ptr %out) {
|
860 | 866 | ret void
|
861 | 867 | }
|
862 | 868 |
|
| 869 | +define <vscale x 8 x bfloat> @insert_nxv8bf16_v2bf16_0(<vscale x 8 x bfloat> %vec, ptr %svp) { |
| 870 | +; VLA-LABEL: insert_nxv8bf16_v2bf16_0: |
| 871 | +; VLA: # %bb.0: |
| 872 | +; VLA-NEXT: vsetivli zero, 2, e16, mf4, ta, ma |
| 873 | +; VLA-NEXT: vle16.v v10, (a0) |
| 874 | +; VLA-NEXT: vsetivli zero, 2, e16, m2, tu, ma |
| 875 | +; VLA-NEXT: vmv.v.v v8, v10 |
| 876 | +; VLA-NEXT: ret |
| 877 | +; |
| 878 | +; VLS-LABEL: insert_nxv8bf16_v2bf16_0: |
| 879 | +; VLS: # %bb.0: |
| 880 | +; VLS-NEXT: vsetivli zero, 2, e16, mf4, ta, ma |
| 881 | +; VLS-NEXT: vle16.v v10, (a0) |
| 882 | +; VLS-NEXT: vsetivli zero, 2, e16, m1, tu, ma |
| 883 | +; VLS-NEXT: vmv.v.v v8, v10 |
| 884 | +; VLS-NEXT: ret |
| 885 | + %sv = load <2 x bfloat>, ptr %svp |
| 886 | + %v = call <vscale x 8 x bfloat> @llvm.vector.insert.v2bf16.nxv8bf16(<vscale x 8 x bfloat> %vec, <2 x bfloat> %sv, i64 0) |
| 887 | + ret <vscale x 8 x bfloat> %v |
| 888 | +} |
| 889 | + |
| 890 | +define <vscale x 8 x bfloat> @insert_nxv8bf16_v2bf16_2(<vscale x 8 x bfloat> %vec, ptr %svp) { |
| 891 | +; VLA-LABEL: insert_nxv8bf16_v2bf16_2: |
| 892 | +; VLA: # %bb.0: |
| 893 | +; VLA-NEXT: vsetivli zero, 2, e16, mf4, ta, ma |
| 894 | +; VLA-NEXT: vle16.v v10, (a0) |
| 895 | +; VLA-NEXT: vsetivli zero, 4, e16, m2, tu, ma |
| 896 | +; VLA-NEXT: vslideup.vi v8, v10, 2 |
| 897 | +; VLA-NEXT: ret |
| 898 | +; |
| 899 | +; VLS-LABEL: insert_nxv8bf16_v2bf16_2: |
| 900 | +; VLS: # %bb.0: |
| 901 | +; VLS-NEXT: vsetivli zero, 2, e16, mf4, ta, ma |
| 902 | +; VLS-NEXT: vle16.v v10, (a0) |
| 903 | +; VLS-NEXT: vsetivli zero, 4, e16, m1, tu, ma |
| 904 | +; VLS-NEXT: vslideup.vi v8, v10, 2 |
| 905 | +; VLS-NEXT: ret |
| 906 | + %sv = load <2 x bfloat>, ptr %svp |
| 907 | + %v = call <vscale x 8 x bfloat> @llvm.vector.insert.v2bf16.nxv8bf16(<vscale x 8 x bfloat> %vec, <2 x bfloat> %sv, i64 2) |
| 908 | + ret <vscale x 8 x bfloat> %v |
| 909 | +} |
| 910 | + |
| 911 | +define <vscale x 8 x half> @insert_nxv8f16_v2f16_0(<vscale x 8 x half> %vec, ptr %svp) { |
| 912 | +; VLA-LABEL: insert_nxv8f16_v2f16_0: |
| 913 | +; VLA: # %bb.0: |
| 914 | +; VLA-NEXT: vsetivli zero, 2, e16, mf4, ta, ma |
| 915 | +; VLA-NEXT: vle16.v v10, (a0) |
| 916 | +; VLA-NEXT: vsetivli zero, 2, e16, m2, tu, ma |
| 917 | +; VLA-NEXT: vmv.v.v v8, v10 |
| 918 | +; VLA-NEXT: ret |
| 919 | +; |
| 920 | +; VLS-LABEL: insert_nxv8f16_v2f16_0: |
| 921 | +; VLS: # %bb.0: |
| 922 | +; VLS-NEXT: vsetivli zero, 2, e16, mf4, ta, ma |
| 923 | +; VLS-NEXT: vle16.v v10, (a0) |
| 924 | +; VLS-NEXT: vsetivli zero, 2, e16, m1, tu, ma |
| 925 | +; VLS-NEXT: vmv.v.v v8, v10 |
| 926 | +; VLS-NEXT: ret |
| 927 | + %sv = load <2 x half>, ptr %svp |
| 928 | + %v = call <vscale x 8 x half> @llvm.vector.insert.v2f16.nxv8f16(<vscale x 8 x half> %vec, <2 x half> %sv, i64 0) |
| 929 | + ret <vscale x 8 x half> %v |
| 930 | +} |
| 931 | + |
| 932 | +define <vscale x 8 x half> @insert_nxv8f16_v2f16_2(<vscale x 8 x half> %vec, ptr %svp) { |
| 933 | +; VLA-LABEL: insert_nxv8f16_v2f16_2: |
| 934 | +; VLA: # %bb.0: |
| 935 | +; VLA-NEXT: vsetivli zero, 2, e16, mf4, ta, ma |
| 936 | +; VLA-NEXT: vle16.v v10, (a0) |
| 937 | +; VLA-NEXT: vsetivli zero, 4, e16, m2, tu, ma |
| 938 | +; VLA-NEXT: vslideup.vi v8, v10, 2 |
| 939 | +; VLA-NEXT: ret |
| 940 | +; |
| 941 | +; VLS-LABEL: insert_nxv8f16_v2f16_2: |
| 942 | +; VLS: # %bb.0: |
| 943 | +; VLS-NEXT: vsetivli zero, 2, e16, mf4, ta, ma |
| 944 | +; VLS-NEXT: vle16.v v10, (a0) |
| 945 | +; VLS-NEXT: vsetivli zero, 4, e16, m1, tu, ma |
| 946 | +; VLS-NEXT: vslideup.vi v8, v10, 2 |
| 947 | +; VLS-NEXT: ret |
| 948 | + %sv = load <2 x half>, ptr %svp |
| 949 | + %v = call <vscale x 8 x half> @llvm.vector.insert.v2f16.nxv8f16(<vscale x 8 x half> %vec, <2 x half> %sv, i64 2) |
| 950 | + ret <vscale x 8 x half> %v |
| 951 | +} |
| 952 | + |
863 | 953 | declare <8 x i1> @llvm.vector.insert.v4i1.v8i1(<8 x i1>, <4 x i1>, i64)
|
864 | 954 | declare <32 x i1> @llvm.vector.insert.v8i1.v32i1(<32 x i1>, <8 x i1>, i64)
|
865 | 955 |
|
|
0 commit comments