| 1 |
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 |
| 2 |
// REQUIRES: riscv-registered-target |
| 3 |
// RUN: %clang_cc1 -triple riscv64 -target-feature +v -target-feature +zvl512b \ |
| 4 |
// RUN: -target-feature +zvbb \ |
| 5 |
// RUN: -target-feature +zvbc \ |
| 6 |
// RUN: -target-feature +zvkb \ |
| 7 |
// RUN: -target-feature +zvkg \ |
| 8 |
// RUN: -target-feature +zvkned \ |
| 9 |
// RUN: -target-feature +zvknhb \ |
| 10 |
// RUN: -target-feature +zvksed \ |
| 11 |
// RUN: -target-feature +zvksh \ |
| 12 |
// RUN: -target-feature +experimental \ |
| 13 |
// RUN: -disable-O0-optnone \ |
| 14 |
// RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \ |
| 15 |
// RUN: FileCheck --check-prefix=CHECK-RV64 %s |
| 16 |
|
| 17 |
#include <riscv_vector.h> |
| 18 |
|
| 19 |
// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i32> @test_vsm3c_vi_u32mf2_tu |
| 20 |
// CHECK-RV64-SAME: (<vscale x 1 x i32> [[VD:%.*]], <vscale x 1 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { |
| 21 |
// CHECK-RV64-NEXT: entry: |
| 22 |
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 1 x i32> @llvm.riscv.vsm3c.nxv1i32.i64.i64(<vscale x 1 x i32> [[VD]], <vscale x 1 x i32> [[VS2]], i64 0, i64 [[VL]], i64 2) |
| 23 |
// CHECK-RV64-NEXT: ret <vscale x 1 x i32> [[TMP0]] |
| 24 |
// |
| 25 |
vuint32mf2_t test_vsm3c_vi_u32mf2_tu(vuint32mf2_t vd, vuint32mf2_t vs2, size_t vl) { |
| 26 |
return __riscv_vsm3c_vi_u32mf2_tu(vd, vs2, 0, vl); |
| 27 |
} |
| 28 |
|
| 29 |
// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i32> @test_vsm3c_vi_u32m1_tu |
| 30 |
// CHECK-RV64-SAME: (<vscale x 2 x i32> [[VD:%.*]], <vscale x 2 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { |
| 31 |
// CHECK-RV64-NEXT: entry: |
| 32 |
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i32> @llvm.riscv.vsm3c.nxv2i32.i64.i64(<vscale x 2 x i32> [[VD]], <vscale x 2 x i32> [[VS2]], i64 0, i64 [[VL]], i64 2) |
| 33 |
// CHECK-RV64-NEXT: ret <vscale x 2 x i32> [[TMP0]] |
| 34 |
// |
| 35 |
vuint32m1_t test_vsm3c_vi_u32m1_tu(vuint32m1_t vd, vuint32m1_t vs2, size_t vl) { |
| 36 |
return __riscv_vsm3c_vi_u32m1_tu(vd, vs2, 0, vl); |
| 37 |
} |
| 38 |
|
| 39 |
// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i32> @test_vsm3c_vi_u32m2_tu |
| 40 |
// CHECK-RV64-SAME: (<vscale x 4 x i32> [[VD:%.*]], <vscale x 4 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { |
| 41 |
// CHECK-RV64-NEXT: entry: |
| 42 |
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i32> @llvm.riscv.vsm3c.nxv4i32.i64.i64(<vscale x 4 x i32> [[VD]], <vscale x 4 x i32> [[VS2]], i64 0, i64 [[VL]], i64 2) |
| 43 |
// CHECK-RV64-NEXT: ret <vscale x 4 x i32> [[TMP0]] |
| 44 |
// |
| 45 |
vuint32m2_t test_vsm3c_vi_u32m2_tu(vuint32m2_t vd, vuint32m2_t vs2, size_t vl) { |
| 46 |
return __riscv_vsm3c_vi_u32m2_tu(vd, vs2, 0, vl); |
| 47 |
} |
| 48 |
|
| 49 |
// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i32> @test_vsm3c_vi_u32m4_tu |
| 50 |
// CHECK-RV64-SAME: (<vscale x 8 x i32> [[VD:%.*]], <vscale x 8 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { |
| 51 |
// CHECK-RV64-NEXT: entry: |
| 52 |
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i32> @llvm.riscv.vsm3c.nxv8i32.i64.i64(<vscale x 8 x i32> [[VD]], <vscale x 8 x i32> [[VS2]], i64 0, i64 [[VL]], i64 2) |
| 53 |
// CHECK-RV64-NEXT: ret <vscale x 8 x i32> [[TMP0]] |
| 54 |
// |
| 55 |
vuint32m4_t test_vsm3c_vi_u32m4_tu(vuint32m4_t vd, vuint32m4_t vs2, size_t vl) { |
| 56 |
return __riscv_vsm3c_vi_u32m4_tu(vd, vs2, 0, vl); |
| 57 |
} |
| 58 |
|
| 59 |
// CHECK-RV64-LABEL: define dso_local <vscale x 16 x i32> @test_vsm3c_vi_u32m8_tu |
| 60 |
// CHECK-RV64-SAME: (<vscale x 16 x i32> [[VD:%.*]], <vscale x 16 x i32> [[VS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { |
| 61 |
// CHECK-RV64-NEXT: entry: |
| 62 |
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 16 x i32> @llvm.riscv.vsm3c.nxv16i32.i64.i64(<vscale x 16 x i32> [[VD]], <vscale x 16 x i32> [[VS2]], i64 0, i64 [[VL]], i64 2) |
| 63 |
// CHECK-RV64-NEXT: ret <vscale x 16 x i32> [[TMP0]] |
| 64 |
// |
| 65 |
vuint32m8_t test_vsm3c_vi_u32m8_tu(vuint32m8_t vd, vuint32m8_t vs2, size_t vl) { |
| 66 |
return __riscv_vsm3c_vi_u32m8_tu(vd, vs2, 0, vl); |
| 67 |
} |
| 68 |
|