Debian Codegraph @

clang/test/CodeGen/RISCV/rvv-intrinsics-sifive/non-policy/non-overloaded/sf_vtmv_v_t.c

raw
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4
2 // REQUIRES: riscv-registered-target
3 // RUN: %clang_cc1 -triple riscv64 -target-feature +xsfmmbase \
4 // RUN: -target-feature +zvfhmin -target-feature +zvfbfmin \
5 // RUN: -target-feature +zve64d \
6 // RUN: -disable-O0-optnone -emit-llvm %s -o - | \
7 // RUN: opt -S -passes=mem2reg | FileCheck --check-prefix=CHECK-RV64 %s
8
9 #include <sifive_vector.h>
10
11 // CHECK-RV64-LABEL: define dso_local <vscale x 32 x bfloat> @test_sf_vtmv_v_t_bf16m8(
12 // CHECK-RV64-SAME: i64 noundef [[TSS:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] {
13 // CHECK-RV64-NEXT: entry:
14 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 32 x bfloat> @llvm.riscv.sf.vtmv.v.t.nxv32bf16.i64(i64 [[TSS]], i64 [[VL]])
15 // CHECK-RV64-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
16 //
17 vbfloat16m8_t test_sf_vtmv_v_t_bf16m8(size_t tss, size_t vl) {
18 return __riscv_sf_vtmv_v_t_bf16m8(tss, vl);
19 }
20
21 // CHECK-RV64-LABEL: define dso_local <vscale x 32 x half> @test_sf_vtmv_v_t_f16m8(
22 // CHECK-RV64-SAME: i64 noundef [[TSS:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
23 // CHECK-RV64-NEXT: entry:
24 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 32 x half> @llvm.riscv.sf.vtmv.v.t.nxv32f16.i64(i64 [[TSS]], i64 [[VL]])
25 // CHECK-RV64-NEXT: ret <vscale x 32 x half> [[TMP0]]
26 //
27 vfloat16m8_t test_sf_vtmv_v_t_f16m8(size_t tss, size_t vl) {
28 return __riscv_sf_vtmv_v_t_f16m8(tss, vl);
29 }
30
31 // CHECK-RV64-LABEL: define dso_local <vscale x 16 x float> @test_sf_vtmv_v_t_f32m8(
32 // CHECK-RV64-SAME: i64 noundef [[TSS:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
33 // CHECK-RV64-NEXT: entry:
34 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 16 x float> @llvm.riscv.sf.vtmv.v.t.nxv16f32.i64(i64 [[TSS]], i64 [[VL]])
35 // CHECK-RV64-NEXT: ret <vscale x 16 x float> [[TMP0]]
36 //
37 vfloat32m8_t test_sf_vtmv_v_t_f32m8(size_t tss, size_t vl) {
38 return __riscv_sf_vtmv_v_t_f32m8(tss, vl);
39 }
40
41 // CHECK-RV64-LABEL: define dso_local <vscale x 8 x double> @test_sf_vtmv_v_t_f64m8(
42 // CHECK-RV64-SAME: i64 noundef [[TSS:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
43 // CHECK-RV64-NEXT: entry:
44 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x double> @llvm.riscv.sf.vtmv.v.t.nxv8f64.i64(i64 [[TSS]], i64 [[VL]])
45 // CHECK-RV64-NEXT: ret <vscale x 8 x double> [[TMP0]]
46 //
47 vfloat64m8_t test_sf_vtmv_v_t_f64m8(size_t tss, size_t vl) {
48 return __riscv_sf_vtmv_v_t_f64m8(tss, vl);
49 }
50
51 // CHECK-RV64-LABEL: define dso_local <vscale x 64 x i8> @test_sf_vtmv_v_t_i8m8(
52 // CHECK-RV64-SAME: i64 noundef [[TSS:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
53 // CHECK-RV64-NEXT: entry:
54 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 64 x i8> @llvm.riscv.sf.vtmv.v.t.nxv64i8.i64(i64 [[TSS]], i64 [[VL]])
55 // CHECK-RV64-NEXT: ret <vscale x 64 x i8> [[TMP0]]
56 //
57 vint8m8_t test_sf_vtmv_v_t_i8m8(size_t tss, size_t vl) {
58 return __riscv_sf_vtmv_v_t_i8m8(tss, vl);
59 }
60
61 // CHECK-RV64-LABEL: define dso_local <vscale x 32 x i16> @test_sf_vtmv_v_t_i16m8(
62 // CHECK-RV64-SAME: i64 noundef [[TSS:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
63 // CHECK-RV64-NEXT: entry:
64 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 32 x i16> @llvm.riscv.sf.vtmv.v.t.nxv32i16.i64(i64 [[TSS]], i64 [[VL]])
65 // CHECK-RV64-NEXT: ret <vscale x 32 x i16> [[TMP0]]
66 //
67 vint16m8_t test_sf_vtmv_v_t_i16m8(size_t tss, size_t vl) {
68 return __riscv_sf_vtmv_v_t_i16m8(tss, vl);
69 }
70
71 // CHECK-RV64-LABEL: define dso_local <vscale x 16 x i32> @test_sf_vtmv_v_t_i32m8(
72 // CHECK-RV64-SAME: i64 noundef [[TSS:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
73 // CHECK-RV64-NEXT: entry:
74 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 16 x i32> @llvm.riscv.sf.vtmv.v.t.nxv16i32.i64(i64 [[TSS]], i64 [[VL]])
75 // CHECK-RV64-NEXT: ret <vscale x 16 x i32> [[TMP0]]
76 //
77 vint32m8_t test_sf_vtmv_v_t_i32m8(size_t tss, size_t vl) {
78 return __riscv_sf_vtmv_v_t_i32m8(tss, vl);
79 }
80
81 // CHECK-RV64-LABEL: define dso_local <vscale x 8 x i64> @test_sf_vtmv_v_t_i64m8(
82 // CHECK-RV64-SAME: i64 noundef [[TSS:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
83 // CHECK-RV64-NEXT: entry:
84 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i64> @llvm.riscv.sf.vtmv.v.t.nxv8i64.i64(i64 [[TSS]], i64 [[VL]])
85 // CHECK-RV64-NEXT: ret <vscale x 8 x i64> [[TMP0]]
86 //
87 vint64m8_t test_sf_vtmv_v_t_i64m8(size_t tss, size_t vl) {
88 return __riscv_sf_vtmv_v_t_i64m8(tss, vl);
89 }
90
91 // CHECK-RV64-LABEL: define dso_local <vscale x 64 x i8> @test_sf_vtmv_v_t_u8m8(
92 // CHECK-RV64-SAME: i64 noundef [[TSS:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
93 // CHECK-RV64-NEXT: entry:
94 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 64 x i8> @llvm.riscv.sf.vtmv.v.t.nxv64i8.i64(i64 [[TSS]], i64 [[VL]])
95 // CHECK-RV64-NEXT: ret <vscale x 64 x i8> [[TMP0]]
96 //
97 vuint8m8_t test_sf_vtmv_v_t_u8m8(size_t tss, size_t vl) {
98 return __riscv_sf_vtmv_v_t_u8m8(tss, vl);
99 }
100
101 // CHECK-RV64-LABEL: define dso_local <vscale x 32 x i16> @test_sf_vtmv_v_t_u16m8(
102 // CHECK-RV64-SAME: i64 noundef [[TSS:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
103 // CHECK-RV64-NEXT: entry:
104 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 32 x i16> @llvm.riscv.sf.vtmv.v.t.nxv32i16.i64(i64 [[TSS]], i64 [[VL]])
105 // CHECK-RV64-NEXT: ret <vscale x 32 x i16> [[TMP0]]
106 //
107 vuint16m8_t test_sf_vtmv_v_t_u16m8(size_t tss, size_t vl) {
108 return __riscv_sf_vtmv_v_t_u16m8(tss, vl);
109 }
110
111 // CHECK-RV64-LABEL: define dso_local <vscale x 16 x i32> @test_sf_vtmv_v_t_u32m8(
112 // CHECK-RV64-SAME: i64 noundef [[TSS:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
113 // CHECK-RV64-NEXT: entry:
114 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 16 x i32> @llvm.riscv.sf.vtmv.v.t.nxv16i32.i64(i64 [[TSS]], i64 [[VL]])
115 // CHECK-RV64-NEXT: ret <vscale x 16 x i32> [[TMP0]]
116 //
117 vuint32m8_t test_sf_vtmv_v_t_u32m8(size_t tss, size_t vl) {
118 return __riscv_sf_vtmv_v_t_u32m8(tss, vl);
119 }
120
121 // CHECK-RV64-LABEL: define dso_local <vscale x 8 x i64> @test_sf_vtmv_v_t_u64m8(
122 // CHECK-RV64-SAME: i64 noundef [[TSS:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
123 // CHECK-RV64-NEXT: entry:
124 // CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i64> @llvm.riscv.sf.vtmv.v.t.nxv8i64.i64(i64 [[TSS]], i64 [[VL]])
125 // CHECK-RV64-NEXT: ret <vscale x 8 x i64> [[TMP0]]
126 //
127 vuint64m8_t test_sf_vtmv_v_t_u64m8(size_t tss, size_t vl) {
128 return __riscv_sf_vtmv_v_t_u64m8(tss, vl);
129 }
130