171 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py2// REQUIRES: riscv-registered-target3// RUN: %clang_cc1 -triple riscv64 -target-feature +zve64x \4// RUN: -target-feature +xandesvdot -disable-O0-optnone \5// RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \6// RUN: FileCheck --check-prefix=CHECK-RV64 %s7 8#include <andes_vector.h>9 10// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u32mf2(11// CHECK-RV64-NEXT: entry:12// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 1 x i32> @llvm.riscv.nds.vd4dotu.nxv1i32.nxv4i8.nxv4i8.i64(<vscale x 1 x i32> [[VD:%.*]], <vscale x 4 x i8> [[VS1:%.*]], <vscale x 4 x i8> [[VS2:%.*]], i64 [[VL:%.*]], i64 3)13// CHECK-RV64-NEXT: ret <vscale x 1 x i32> [[TMP0]]14//15vuint32mf2_t test_nds_vd4dotu_vv_u32mf2(vuint32mf2_t vd, vuint8mf2_t vs1, vuint8mf2_t vs2, size_t vl) {16 return __riscv_nds_vd4dotu(vd, vs1, vs2, vl);17}18 19// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u32m1(20// CHECK-RV64-NEXT: entry:21// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i32> @llvm.riscv.nds.vd4dotu.nxv2i32.nxv8i8.nxv8i8.i64(<vscale x 2 x i32> [[VD:%.*]], <vscale x 8 x i8> [[VS1:%.*]], <vscale x 8 x i8> [[VS2:%.*]], i64 [[VL:%.*]], i64 3)22// CHECK-RV64-NEXT: ret <vscale x 2 x i32> [[TMP0]]23//24vuint32m1_t test_nds_vd4dotu_vv_u32m1(vuint32m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl) {25 return __riscv_nds_vd4dotu(vd, vs1, vs2, vl);26}27 28// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u32m2(29// CHECK-RV64-NEXT: entry:30// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i32> @llvm.riscv.nds.vd4dotu.nxv4i32.nxv16i8.nxv16i8.i64(<vscale x 4 x i32> [[VD:%.*]], <vscale x 16 x i8> [[VS1:%.*]], <vscale x 16 x i8> [[VS2:%.*]], i64 [[VL:%.*]], i64 3)31// CHECK-RV64-NEXT: ret <vscale x 4 x i32> [[TMP0]]32//33vuint32m2_t test_nds_vd4dotu_vv_u32m2(vuint32m2_t vd, vuint8m2_t vs1, vuint8m2_t vs2, size_t vl) {34 return __riscv_nds_vd4dotu(vd, vs1, vs2, vl);35}36 37// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u32m4(38// CHECK-RV64-NEXT: entry:39// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i32> @llvm.riscv.nds.vd4dotu.nxv8i32.nxv32i8.nxv32i8.i64(<vscale x 8 x i32> [[VD:%.*]], <vscale x 32 x i8> [[VS1:%.*]], <vscale x 32 x i8> [[VS2:%.*]], i64 [[VL:%.*]], i64 3)40// CHECK-RV64-NEXT: ret <vscale x 8 x i32> [[TMP0]]41//42vuint32m4_t test_nds_vd4dotu_vv_u32m4(vuint32m4_t vd, vuint8m4_t vs1, vuint8m4_t vs2, size_t vl) {43 return __riscv_nds_vd4dotu(vd, vs1, vs2, vl);44}45 46// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u32m8(47// CHECK-RV64-NEXT: entry:48// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 16 x i32> @llvm.riscv.nds.vd4dotu.nxv16i32.nxv64i8.nxv64i8.i64(<vscale x 16 x i32> [[VD:%.*]], <vscale x 64 x i8> [[VS1:%.*]], <vscale x 64 x i8> [[VS2:%.*]], i64 [[VL:%.*]], i64 3)49// CHECK-RV64-NEXT: ret <vscale x 16 x i32> [[TMP0]]50//51vuint32m8_t test_nds_vd4dotu_vv_u32m8(vuint32m8_t vd, vuint8m8_t vs1, vuint8m8_t vs2, size_t vl) {52 return __riscv_nds_vd4dotu(vd, vs1, vs2, vl);53}54 55// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u64m1(56// CHECK-RV64-NEXT: entry:57// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 1 x i64> @llvm.riscv.nds.vd4dotu.nxv1i64.nxv4i16.nxv4i16.i64(<vscale x 1 x i64> [[VD:%.*]], <vscale x 4 x i16> [[VS1:%.*]], <vscale x 4 x i16> [[VS2:%.*]], i64 [[VL:%.*]], i64 3)58// CHECK-RV64-NEXT: ret <vscale x 1 x i64> [[TMP0]]59//60vuint64m1_t test_nds_vd4dotu_vv_u64m1(vuint64m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl) {61 return __riscv_nds_vd4dotu(vd, vs1, vs2, vl);62}63 64// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u64m2(65// CHECK-RV64-NEXT: entry:66// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i64> @llvm.riscv.nds.vd4dotu.nxv2i64.nxv8i16.nxv8i16.i64(<vscale x 2 x i64> [[VD:%.*]], <vscale x 8 x i16> [[VS1:%.*]], <vscale x 8 x i16> [[VS2:%.*]], i64 [[VL:%.*]], i64 3)67// CHECK-RV64-NEXT: ret <vscale x 2 x i64> [[TMP0]]68//69vuint64m2_t test_nds_vd4dotu_vv_u64m2(vuint64m2_t vd, vuint16m2_t vs1, vuint16m2_t vs2, size_t vl) {70 return __riscv_nds_vd4dotu(vd, vs1, vs2, vl);71}72 73// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u64m4(74// CHECK-RV64-NEXT: entry:75// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i64> @llvm.riscv.nds.vd4dotu.nxv4i64.nxv16i16.nxv16i16.i64(<vscale x 4 x i64> [[VD:%.*]], <vscale x 16 x i16> [[VS1:%.*]], <vscale x 16 x i16> [[VS2:%.*]], i64 [[VL:%.*]], i64 3)76// CHECK-RV64-NEXT: ret <vscale x 4 x i64> [[TMP0]]77//78vuint64m4_t test_nds_vd4dotu_vv_u64m4(vuint64m4_t vd, vuint16m4_t vs1, vuint16m4_t vs2, size_t vl) {79 return __riscv_nds_vd4dotu(vd, vs1, vs2, vl);80}81 82// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u64m8(83// CHECK-RV64-NEXT: entry:84// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i64> @llvm.riscv.nds.vd4dotu.nxv8i64.nxv32i16.nxv32i16.i64(<vscale x 8 x i64> [[VD:%.*]], <vscale x 32 x i16> [[VS1:%.*]], <vscale x 32 x i16> [[VS2:%.*]], i64 [[VL:%.*]], i64 3)85// CHECK-RV64-NEXT: ret <vscale x 8 x i64> [[TMP0]]86//87vuint64m8_t test_nds_vd4dotu_vv_u64m8(vuint64m8_t vd, vuint16m8_t vs1, vuint16m8_t vs2, size_t vl) {88 return __riscv_nds_vd4dotu(vd, vs1, vs2, vl);89}90 91// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u32mf2_m(92// CHECK-RV64-NEXT: entry:93// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 1 x i32> @llvm.riscv.nds.vd4dotu.mask.nxv1i32.nxv4i8.nxv4i8.i64(<vscale x 1 x i32> [[VD:%.*]], <vscale x 4 x i8> [[VS1:%.*]], <vscale x 4 x i8> [[VS2:%.*]], <vscale x 1 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3)94// CHECK-RV64-NEXT: ret <vscale x 1 x i32> [[TMP0]]95//96vuint32mf2_t test_nds_vd4dotu_vv_u32mf2_m(vbool64_t mask, vuint32mf2_t vd, vuint8mf2_t vs1, vuint8mf2_t vs2, size_t vl) {97 return __riscv_nds_vd4dotu(mask, vd, vs1, vs2, vl);98}99 100// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u32m1_m(101// CHECK-RV64-NEXT: entry:102// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i32> @llvm.riscv.nds.vd4dotu.mask.nxv2i32.nxv8i8.nxv8i8.i64(<vscale x 2 x i32> [[VD:%.*]], <vscale x 8 x i8> [[VS1:%.*]], <vscale x 8 x i8> [[VS2:%.*]], <vscale x 2 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3)103// CHECK-RV64-NEXT: ret <vscale x 2 x i32> [[TMP0]]104//105vuint32m1_t test_nds_vd4dotu_vv_u32m1_m(vbool32_t mask, vuint32m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl) {106 return __riscv_nds_vd4dotu(mask, vd, vs1, vs2, vl);107}108 109// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u32m2_m(110// CHECK-RV64-NEXT: entry:111// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i32> @llvm.riscv.nds.vd4dotu.mask.nxv4i32.nxv16i8.nxv16i8.i64(<vscale x 4 x i32> [[VD:%.*]], <vscale x 16 x i8> [[VS1:%.*]], <vscale x 16 x i8> [[VS2:%.*]], <vscale x 4 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3)112// CHECK-RV64-NEXT: ret <vscale x 4 x i32> [[TMP0]]113//114vuint32m2_t test_nds_vd4dotu_vv_u32m2_m(vbool16_t mask, vuint32m2_t vd, vuint8m2_t vs1, vuint8m2_t vs2, size_t vl) {115 return __riscv_nds_vd4dotu(mask, vd, vs1, vs2, vl);116}117 118// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u32m4_m(119// CHECK-RV64-NEXT: entry:120// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i32> @llvm.riscv.nds.vd4dotu.mask.nxv8i32.nxv32i8.nxv32i8.i64(<vscale x 8 x i32> [[VD:%.*]], <vscale x 32 x i8> [[VS1:%.*]], <vscale x 32 x i8> [[VS2:%.*]], <vscale x 8 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3)121// CHECK-RV64-NEXT: ret <vscale x 8 x i32> [[TMP0]]122//123vuint32m4_t test_nds_vd4dotu_vv_u32m4_m(vbool8_t mask, vuint32m4_t vd, vuint8m4_t vs1, vuint8m4_t vs2, size_t vl) {124 return __riscv_nds_vd4dotu(mask, vd, vs1, vs2, vl);125}126 127// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u32m8_m(128// CHECK-RV64-NEXT: entry:129// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 16 x i32> @llvm.riscv.nds.vd4dotu.mask.nxv16i32.nxv64i8.nxv64i8.i64(<vscale x 16 x i32> [[VD:%.*]], <vscale x 64 x i8> [[VS1:%.*]], <vscale x 64 x i8> [[VS2:%.*]], <vscale x 16 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3)130// CHECK-RV64-NEXT: ret <vscale x 16 x i32> [[TMP0]]131//132vuint32m8_t test_nds_vd4dotu_vv_u32m8_m(vbool4_t mask, vuint32m8_t vd, vuint8m8_t vs1, vuint8m8_t vs2, size_t vl) {133 return __riscv_nds_vd4dotu(mask, vd, vs1, vs2, vl);134}135 136// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u64m1_m(137// CHECK-RV64-NEXT: entry:138// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 1 x i64> @llvm.riscv.nds.vd4dotu.mask.nxv1i64.nxv4i16.nxv4i16.i64(<vscale x 1 x i64> [[VD:%.*]], <vscale x 4 x i16> [[VS1:%.*]], <vscale x 4 x i16> [[VS2:%.*]], <vscale x 1 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3)139// CHECK-RV64-NEXT: ret <vscale x 1 x i64> [[TMP0]]140//141vuint64m1_t test_nds_vd4dotu_vv_u64m1_m(vbool64_t mask, vuint64m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl) {142 return __riscv_nds_vd4dotu(mask, vd, vs1, vs2, vl);143}144 145// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u64m2_m(146// CHECK-RV64-NEXT: entry:147// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i64> @llvm.riscv.nds.vd4dotu.mask.nxv2i64.nxv8i16.nxv8i16.i64(<vscale x 2 x i64> [[VD:%.*]], <vscale x 8 x i16> [[VS1:%.*]], <vscale x 8 x i16> [[VS2:%.*]], <vscale x 2 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3)148// CHECK-RV64-NEXT: ret <vscale x 2 x i64> [[TMP0]]149//150vuint64m2_t test_nds_vd4dotu_vv_u64m2_m(vbool32_t mask, vuint64m2_t vd, vuint16m2_t vs1, vuint16m2_t vs2, size_t vl) {151 return __riscv_nds_vd4dotu(mask, vd, vs1, vs2, vl);152}153 154// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u64m4_m(155// CHECK-RV64-NEXT: entry:156// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i64> @llvm.riscv.nds.vd4dotu.mask.nxv4i64.nxv16i16.nxv16i16.i64(<vscale x 4 x i64> [[VD:%.*]], <vscale x 16 x i16> [[VS1:%.*]], <vscale x 16 x i16> [[VS2:%.*]], <vscale x 4 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3)157// CHECK-RV64-NEXT: ret <vscale x 4 x i64> [[TMP0]]158//159vuint64m4_t test_nds_vd4dotu_vv_u64m4_m(vbool16_t mask, vuint64m4_t vd, vuint16m4_t vs1, vuint16m4_t vs2, size_t vl) {160 return __riscv_nds_vd4dotu(mask, vd, vs1, vs2, vl);161}162 163// CHECK-RV64-LABEL: @test_nds_vd4dotu_vv_u64m8_m(164// CHECK-RV64-NEXT: entry:165// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i64> @llvm.riscv.nds.vd4dotu.mask.nxv8i64.nxv32i16.nxv32i16.i64(<vscale x 8 x i64> [[VD:%.*]], <vscale x 32 x i16> [[VS1:%.*]], <vscale x 32 x i16> [[VS2:%.*]], <vscale x 8 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3)166// CHECK-RV64-NEXT: ret <vscale x 8 x i64> [[TMP0]]167//168vuint64m8_t test_nds_vd4dotu_vv_u64m8_m(vbool8_t mask, vuint64m8_t vd, vuint16m8_t vs1, vuint16m8_t vs2, size_t vl) {169 return __riscv_nds_vd4dotu(mask, vd, vs1, vs2, vl);170}171