1*207e5cccSFangrui Song // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 3 2*207e5cccSFangrui Song // REQUIRES: aarch64-registered-target 3*207e5cccSFangrui Song // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -O1 -Werror -emit-llvm -o - %s | FileCheck %s -check-prefixes=CHECK,CHECK-C 4*207e5cccSFangrui Song // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefixes=CHECK,CHECK-CXX 5*207e5cccSFangrui Song // RUN: %clang_cc1 -fclang-abi-compat=latest -DSME_OVERLOADED_FORMS -triple aarch64 -target-feature +sme -O1 -Werror -emit-llvm -o - %s | FileCheck %s -check-prefixes=CHECK,CHECK-C 6*207e5cccSFangrui Song // RUN: %clang_cc1 -fclang-abi-compat=latest -DSME_OVERLOADED_FORMS -triple aarch64 -target-feature +sme -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefixes=CHECK,CHECK-CXX 7*207e5cccSFangrui Song // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -O1 -Werror -o /dev/null %s 8*207e5cccSFangrui Song 9*207e5cccSFangrui Song #include <arm_sme.h> 10*207e5cccSFangrui Song 11*207e5cccSFangrui Song #ifdef SME_OVERLOADED_FORMS 12*207e5cccSFangrui Song #define SME_ACLE_FUNC(A1,A2_UNUSED,A3) A1##A3 13*207e5cccSFangrui Song #else 14*207e5cccSFangrui Song #define SME_ACLE_FUNC(A1,A2,A3) A1##A2##A3 15*207e5cccSFangrui Song #endif 16*207e5cccSFangrui Song 17*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za8_s8( 18*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { 19*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 20*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 21*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 22*207e5cccSFangrui Song // 23*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z23test_svwrite_hor_za8_s8ju10__SVBool_tu10__SVInt8_t( 24*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { 25*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 26*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 27*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 28*207e5cccSFangrui Song // 29*207e5cccSFangrui Song void test_svwrite_hor_za8_s8(uint32_t slice_base, svbool_t pg, svint8_t zn) __arm_streaming __arm_inout("za") { 30*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za8, _s8, _m)(0, slice_base, pg, zn); 31*207e5cccSFangrui Song } 32*207e5cccSFangrui Song 33*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za8_s8_1( 34*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 35*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 36*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 15 37*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv16i8(i32 0, i32 [[ADD]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 38*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 39*207e5cccSFangrui Song // 40*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_hor_za8_s8_1ju10__SVBool_tu10__SVInt8_t( 41*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 42*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 43*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 15 44*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv16i8(i32 0, i32 [[ADD]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 45*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 46*207e5cccSFangrui Song // 47*207e5cccSFangrui Song void test_svwrite_hor_za8_s8_1(uint32_t slice_base, svbool_t pg, svint8_t zn) __arm_streaming __arm_inout("za") { 48*207e5cccSFangrui Song uint32_t slice = slice_base + 15; 49*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za8, _s8, _m)(0, slice, pg, zn); 50*207e5cccSFangrui Song } 51*207e5cccSFangrui Song 52*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za16_s16( 53*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 54*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 55*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 56*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 57*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 58*207e5cccSFangrui Song // 59*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_hor_za16_s16ju10__SVBool_tu11__SVInt16_t( 60*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 61*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 62*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 63*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 64*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 65*207e5cccSFangrui Song // 66*207e5cccSFangrui Song void test_svwrite_hor_za16_s16(uint32_t slice_base, svbool_t pg, svint16_t zn) __arm_streaming __arm_inout("za") { 67*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za16, _s16, _m)(0, slice_base, pg, zn); 68*207e5cccSFangrui Song } 69*207e5cccSFangrui Song 70*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za16_s16_1( 71*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 72*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 73*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 74*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 75*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8i16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 76*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 77*207e5cccSFangrui Song // 78*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_hor_za16_s16_1ju10__SVBool_tu11__SVInt16_t( 79*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 80*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 81*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 82*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 83*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8i16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 84*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 85*207e5cccSFangrui Song // 86*207e5cccSFangrui Song void test_svwrite_hor_za16_s16_1(uint32_t slice_base, svbool_t pg, svint16_t zn) __arm_streaming __arm_inout("za") { 87*207e5cccSFangrui Song uint32_t slice = slice_base + 7; 88*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za16, _s16, _m)(1, slice, pg, zn); 89*207e5cccSFangrui Song } 90*207e5cccSFangrui Song 91*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za32_s32( 92*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 93*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 94*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 95*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 96*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 97*207e5cccSFangrui Song // 98*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_hor_za32_s32ju10__SVBool_tu11__SVInt32_t( 99*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 100*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 101*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 102*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 103*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 104*207e5cccSFangrui Song // 105*207e5cccSFangrui Song void test_svwrite_hor_za32_s32(uint32_t slice_base, svbool_t pg, svint32_t zn) __arm_streaming __arm_inout("za") { 106*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za32, _s32, _m)(0, slice_base, pg, zn); 107*207e5cccSFangrui Song } 108*207e5cccSFangrui Song 109*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za32_s32_1( 110*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 111*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 112*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 3 113*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 114*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv4i32(i32 3, i32 [[ADD]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 115*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 116*207e5cccSFangrui Song // 117*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_hor_za32_s32_1ju10__SVBool_tu11__SVInt32_t( 118*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 119*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 120*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 3 121*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 122*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv4i32(i32 3, i32 [[ADD]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 123*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 124*207e5cccSFangrui Song // 125*207e5cccSFangrui Song void test_svwrite_hor_za32_s32_1(uint32_t slice_base, svbool_t pg, svint32_t zn) __arm_streaming __arm_inout("za") { 126*207e5cccSFangrui Song uint32_t slice = slice_base + 3; 127*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za32, _s32, _m)(3, slice, pg, zn); 128*207e5cccSFangrui Song } 129*207e5cccSFangrui Song 130*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za64_s64( 131*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 132*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 133*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 134*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 135*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 136*207e5cccSFangrui Song // 137*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_hor_za64_s64ju10__SVBool_tu11__SVInt64_t( 138*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 139*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 140*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 141*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 142*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 143*207e5cccSFangrui Song // 144*207e5cccSFangrui Song void test_svwrite_hor_za64_s64(uint32_t slice_base, svbool_t pg, svint64_t zn) __arm_streaming __arm_inout("za") { 145*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za64, _s64, _m)(0, slice_base, pg, zn); 146*207e5cccSFangrui Song } 147*207e5cccSFangrui Song 148*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za64_s64_1( 149*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 150*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 151*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 1 152*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 153*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv2i64(i32 7, i32 [[ADD]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 154*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 155*207e5cccSFangrui Song // 156*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_hor_za64_s64_1ju10__SVBool_tu11__SVInt64_t( 157*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 158*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 159*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 1 160*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 161*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv2i64(i32 7, i32 [[ADD]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 162*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 163*207e5cccSFangrui Song // 164*207e5cccSFangrui Song void test_svwrite_hor_za64_s64_1(uint32_t slice_base, svbool_t pg, svint64_t zn) __arm_streaming __arm_inout("za") { 165*207e5cccSFangrui Song uint32_t slice = slice_base + 1; 166*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za64, _s64, _m)(7, slice, pg, zn); 167*207e5cccSFangrui Song } 168*207e5cccSFangrui Song 169*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za8_u8( 170*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 171*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 172*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 173*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 174*207e5cccSFangrui Song // 175*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z23test_svwrite_hor_za8_u8ju10__SVBool_tu11__SVUint8_t( 176*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 177*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 178*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 179*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 180*207e5cccSFangrui Song // 181*207e5cccSFangrui Song void test_svwrite_hor_za8_u8(uint32_t slice_base, svbool_t pg, svuint8_t zn) __arm_streaming __arm_inout("za") { 182*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za8, _u8, _m)(0, slice_base, pg, zn); 183*207e5cccSFangrui Song } 184*207e5cccSFangrui Song 185*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za8_u8_1( 186*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 187*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 188*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 15 189*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv16i8(i32 0, i32 [[ADD]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 190*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 191*207e5cccSFangrui Song // 192*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_hor_za8_u8_1ju10__SVBool_tu11__SVUint8_t( 193*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 194*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 195*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 15 196*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv16i8(i32 0, i32 [[ADD]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 197*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 198*207e5cccSFangrui Song // 199*207e5cccSFangrui Song void test_svwrite_hor_za8_u8_1(uint32_t slice_base, svbool_t pg, svuint8_t zn) __arm_streaming __arm_inout("za") { 200*207e5cccSFangrui Song uint32_t slice = slice_base + 15; 201*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za8, _u8, _m)(0, slice, pg, zn); 202*207e5cccSFangrui Song } 203*207e5cccSFangrui Song 204*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za16_u16( 205*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 206*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 207*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 208*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 209*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 210*207e5cccSFangrui Song // 211*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_hor_za16_u16ju10__SVBool_tu12__SVUint16_t( 212*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 213*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 214*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 215*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 216*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 217*207e5cccSFangrui Song // 218*207e5cccSFangrui Song void test_svwrite_hor_za16_u16(uint32_t slice_base, svbool_t pg, svuint16_t zn) __arm_streaming __arm_inout("za") { 219*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za16, _u16, _m)(0, slice_base, pg, zn); 220*207e5cccSFangrui Song } 221*207e5cccSFangrui Song 222*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za16_u16_1( 223*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 224*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 225*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 226*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 227*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8i16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 228*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 229*207e5cccSFangrui Song // 230*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_hor_za16_u16_1ju10__SVBool_tu12__SVUint16_t( 231*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 232*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 233*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 234*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 235*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8i16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 236*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 237*207e5cccSFangrui Song // 238*207e5cccSFangrui Song void test_svwrite_hor_za16_u16_1(uint32_t slice_base, svbool_t pg, svuint16_t zn) __arm_streaming __arm_inout("za") { 239*207e5cccSFangrui Song uint32_t slice = slice_base + 7; 240*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za16, _u16, _m)(1, slice, pg, zn); 241*207e5cccSFangrui Song } 242*207e5cccSFangrui Song 243*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za32_u32( 244*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 245*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 246*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 247*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 248*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 249*207e5cccSFangrui Song // 250*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_hor_za32_u32ju10__SVBool_tu12__SVUint32_t( 251*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 252*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 253*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 254*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 255*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 256*207e5cccSFangrui Song // 257*207e5cccSFangrui Song void test_svwrite_hor_za32_u32(uint32_t slice_base, svbool_t pg, svuint32_t zn) __arm_streaming __arm_inout("za") { 258*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za32, _u32, _m)(0, slice_base, pg, zn); 259*207e5cccSFangrui Song } 260*207e5cccSFangrui Song 261*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za32_u32_1( 262*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 263*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 264*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 3 265*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 266*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv4i32(i32 3, i32 [[ADD]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 267*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 268*207e5cccSFangrui Song // 269*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_hor_za32_u32_1ju10__SVBool_tu12__SVUint32_t( 270*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 271*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 272*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 3 273*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 274*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv4i32(i32 3, i32 [[ADD]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 275*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 276*207e5cccSFangrui Song // 277*207e5cccSFangrui Song void test_svwrite_hor_za32_u32_1(uint32_t slice_base, svbool_t pg, svuint32_t zn) __arm_streaming __arm_inout("za") { 278*207e5cccSFangrui Song uint32_t slice = slice_base + 3; 279*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za32, _u32, _m)(3, slice, pg, zn); 280*207e5cccSFangrui Song } 281*207e5cccSFangrui Song 282*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za64_u64( 283*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 284*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 285*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 286*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 287*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 288*207e5cccSFangrui Song // 289*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_hor_za64_u64ju10__SVBool_tu12__SVUint64_t( 290*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 291*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 292*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 293*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 294*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 295*207e5cccSFangrui Song // 296*207e5cccSFangrui Song void test_svwrite_hor_za64_u64(uint32_t slice_base, svbool_t pg, svuint64_t zn) __arm_streaming __arm_inout("za") { 297*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za64, _u64, _m)(0, slice_base, pg, zn); 298*207e5cccSFangrui Song } 299*207e5cccSFangrui Song 300*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za64_u64_1( 301*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 302*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 303*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 1 304*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 305*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv2i64(i32 7, i32 [[ADD]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 306*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 307*207e5cccSFangrui Song // 308*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_hor_za64_u64_1ju10__SVBool_tu12__SVUint64_t( 309*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 310*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 311*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 1 312*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 313*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv2i64(i32 7, i32 [[ADD]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 314*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 315*207e5cccSFangrui Song // 316*207e5cccSFangrui Song void test_svwrite_hor_za64_u64_1(uint32_t slice_base, svbool_t pg, svuint64_t zn) __arm_streaming __arm_inout("za") { 317*207e5cccSFangrui Song uint32_t slice = slice_base + 1; 318*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za64, _u64, _m)(7, slice, pg, zn); 319*207e5cccSFangrui Song } 320*207e5cccSFangrui Song 321*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za16_f16( 322*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 323*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 324*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 325*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8f16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 326*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 327*207e5cccSFangrui Song // 328*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_hor_za16_f16ju10__SVBool_tu13__SVFloat16_t( 329*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 330*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 331*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 332*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8f16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 333*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 334*207e5cccSFangrui Song // 335*207e5cccSFangrui Song void test_svwrite_hor_za16_f16(uint32_t slice_base, svbool_t pg, svfloat16_t zn) __arm_streaming __arm_inout("za") { 336*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za16, _f16, _m)(0, slice_base, pg, zn); 337*207e5cccSFangrui Song } 338*207e5cccSFangrui Song 339*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za16_f16_1( 340*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 341*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 342*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 343*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 344*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8f16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 345*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 346*207e5cccSFangrui Song // 347*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_hor_za16_f16_1ju10__SVBool_tu13__SVFloat16_t( 348*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 349*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 350*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 351*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 352*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8f16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 353*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 354*207e5cccSFangrui Song // 355*207e5cccSFangrui Song void test_svwrite_hor_za16_f16_1(uint32_t slice_base, svbool_t pg, svfloat16_t zn) __arm_streaming __arm_inout("za") { 356*207e5cccSFangrui Song uint32_t slice = slice_base + 7; 357*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za16, _f16, _m)(1, slice, pg, zn); 358*207e5cccSFangrui Song } 359*207e5cccSFangrui Song 360*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za16_bf16( 361*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 362*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 363*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 364*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8bf16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 365*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 366*207e5cccSFangrui Song // 367*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_hor_za16_bf16ju10__SVBool_tu14__SVBfloat16_t( 368*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 369*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 370*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 371*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8bf16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 372*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 373*207e5cccSFangrui Song // 374*207e5cccSFangrui Song void test_svwrite_hor_za16_bf16(uint32_t slice_base, svbool_t pg, svbfloat16_t zn) __arm_streaming __arm_inout("za") { 375*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za16, _bf16, _m)(0, slice_base, pg, zn); 376*207e5cccSFangrui Song } 377*207e5cccSFangrui Song 378*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za16_bf16_1( 379*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 380*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 381*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 382*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 383*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8bf16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 384*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 385*207e5cccSFangrui Song // 386*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_hor_za16_bf16_1ju10__SVBool_tu14__SVBfloat16_t( 387*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 388*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 389*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 390*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 391*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv8bf16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 392*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 393*207e5cccSFangrui Song // 394*207e5cccSFangrui Song void test_svwrite_hor_za16_bf16_1(uint32_t slice_base, svbool_t pg, svbfloat16_t zn) __arm_streaming __arm_inout("za") { 395*207e5cccSFangrui Song uint32_t slice = slice_base + 7; 396*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za16, _bf16, _m)(1, slice, pg, zn); 397*207e5cccSFangrui Song } 398*207e5cccSFangrui Song 399*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za32_f32( 400*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 401*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 402*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 403*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv4f32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 404*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 405*207e5cccSFangrui Song // 406*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_hor_za32_f32ju10__SVBool_tu13__SVFloat32_t( 407*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 408*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 409*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 410*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv4f32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 411*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 412*207e5cccSFangrui Song // 413*207e5cccSFangrui Song void test_svwrite_hor_za32_f32(uint32_t slice_base, svbool_t pg, svfloat32_t zn) __arm_streaming __arm_inout("za") { 414*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za32, _f32, _m)(0, slice_base, pg, zn); 415*207e5cccSFangrui Song } 416*207e5cccSFangrui Song 417*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za32_f32_1( 418*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 419*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 420*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 3 421*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 422*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv4f32(i32 3, i32 [[ADD]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 423*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 424*207e5cccSFangrui Song // 425*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_hor_za32_f32_1ju10__SVBool_tu13__SVFloat32_t( 426*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 427*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 428*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 3 429*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 430*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv4f32(i32 3, i32 [[ADD]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 431*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 432*207e5cccSFangrui Song // 433*207e5cccSFangrui Song void test_svwrite_hor_za32_f32_1(uint32_t slice_base, svbool_t pg, svfloat32_t zn) __arm_streaming __arm_inout("za") { 434*207e5cccSFangrui Song uint32_t slice = slice_base + 3; 435*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za32, _f32, _m)(3, slice, pg, zn); 436*207e5cccSFangrui Song } 437*207e5cccSFangrui Song 438*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za64_f64( 439*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 440*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 441*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 442*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv2f64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 443*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 444*207e5cccSFangrui Song // 445*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_hor_za64_f64ju10__SVBool_tu13__SVFloat64_t( 446*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 447*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 448*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 449*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv2f64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 450*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 451*207e5cccSFangrui Song // 452*207e5cccSFangrui Song void test_svwrite_hor_za64_f64(uint32_t slice_base, svbool_t pg, svfloat64_t zn) __arm_streaming __arm_inout("za") { 453*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za64, _f64, _m)(0, slice_base, pg, zn); 454*207e5cccSFangrui Song } 455*207e5cccSFangrui Song 456*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za64_f64_1( 457*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 458*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 459*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 1 460*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 461*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv2f64(i32 7, i32 [[ADD]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 462*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 463*207e5cccSFangrui Song // 464*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_hor_za64_f64_1ju10__SVBool_tu13__SVFloat64_t( 465*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 466*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 467*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 1 468*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 469*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.horiz.nxv2f64(i32 7, i32 [[ADD]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 470*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 471*207e5cccSFangrui Song // 472*207e5cccSFangrui Song void test_svwrite_hor_za64_f64_1(uint32_t slice_base, svbool_t pg, svfloat64_t zn) __arm_streaming __arm_inout("za") { 473*207e5cccSFangrui Song uint32_t slice = slice_base + 1; 474*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za64, _f64, _m)(7, slice, pg, zn); 475*207e5cccSFangrui Song } 476*207e5cccSFangrui Song 477*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_s8( 478*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 479*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 480*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 481*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 482*207e5cccSFangrui Song // 483*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_hor_za128_s8ju10__SVBool_tu10__SVInt8_t( 484*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 485*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 486*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 487*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 488*207e5cccSFangrui Song // 489*207e5cccSFangrui Song void test_svwrite_hor_za128_s8(uint32_t slice_base, svbool_t pg, svint8_t zn) __arm_streaming __arm_inout("za") { 490*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _s8, _m)(0, slice_base, pg, zn); 491*207e5cccSFangrui Song } 492*207e5cccSFangrui Song 493*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_s8_1( 494*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 495*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 496*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv16i8(i32 15, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 497*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 498*207e5cccSFangrui Song // 499*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_hor_za128_s8_1ju10__SVBool_tu10__SVInt8_t( 500*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 501*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 502*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv16i8(i32 15, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 503*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 504*207e5cccSFangrui Song // 505*207e5cccSFangrui Song void test_svwrite_hor_za128_s8_1(uint32_t slice_base, svbool_t pg, svint8_t zn) __arm_streaming __arm_inout("za") { 506*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _s8, _m)(15, slice_base, pg, zn); 507*207e5cccSFangrui Song } 508*207e5cccSFangrui Song 509*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_s16( 510*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 511*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 512*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 513*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 514*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 515*207e5cccSFangrui Song // 516*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_hor_za128_s16ju10__SVBool_tu11__SVInt16_t( 517*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 518*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 519*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 520*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 521*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 522*207e5cccSFangrui Song // 523*207e5cccSFangrui Song void test_svwrite_hor_za128_s16(uint32_t slice_base, svbool_t pg, svint16_t zn) __arm_streaming __arm_inout("za") { 524*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _s16, _m)(0, slice_base, pg, zn); 525*207e5cccSFangrui Song } 526*207e5cccSFangrui Song 527*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_s16_1( 528*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 529*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 530*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 531*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8i16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 532*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 533*207e5cccSFangrui Song // 534*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_hor_za128_s16_1ju10__SVBool_tu11__SVInt16_t( 535*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 536*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 537*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 538*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8i16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 539*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 540*207e5cccSFangrui Song // 541*207e5cccSFangrui Song void test_svwrite_hor_za128_s16_1(uint32_t slice_base, svbool_t pg, svint16_t zn) __arm_streaming __arm_inout("za") { 542*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _s16, _m)(15, slice_base, pg, zn); 543*207e5cccSFangrui Song } 544*207e5cccSFangrui Song 545*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_s32( 546*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 547*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 548*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 549*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 550*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 551*207e5cccSFangrui Song // 552*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_hor_za128_s32ju10__SVBool_tu11__SVInt32_t( 553*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 554*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 555*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 556*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 557*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 558*207e5cccSFangrui Song // 559*207e5cccSFangrui Song void test_svwrite_hor_za128_s32(uint32_t slice_base, svbool_t pg, svint32_t zn) __arm_streaming __arm_inout("za") { 560*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _s32, _m)(0, slice_base, pg, zn); 561*207e5cccSFangrui Song } 562*207e5cccSFangrui Song 563*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_s32_1( 564*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 565*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 566*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 567*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv4i32(i32 15, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 568*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 569*207e5cccSFangrui Song // 570*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_hor_za128_s32_1ju10__SVBool_tu11__SVInt32_t( 571*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 572*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 573*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 574*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv4i32(i32 15, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 575*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 576*207e5cccSFangrui Song // 577*207e5cccSFangrui Song void test_svwrite_hor_za128_s32_1(uint32_t slice_base, svbool_t pg, svint32_t zn) __arm_streaming __arm_inout("za") { 578*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _s32, _m)(15, slice_base, pg, zn); 579*207e5cccSFangrui Song } 580*207e5cccSFangrui Song 581*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_s64( 582*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 583*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 584*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 585*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 586*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 587*207e5cccSFangrui Song // 588*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_hor_za128_s64ju10__SVBool_tu11__SVInt64_t( 589*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 590*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 591*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 592*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 593*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 594*207e5cccSFangrui Song // 595*207e5cccSFangrui Song void test_svwrite_hor_za128_s64(uint32_t slice_base, svbool_t pg, svint64_t zn) __arm_streaming __arm_inout("za") { 596*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _s64, _m)(0, slice_base, pg, zn); 597*207e5cccSFangrui Song } 598*207e5cccSFangrui Song 599*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_s64_1( 600*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 601*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 602*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 603*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv2i64(i32 15, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 604*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 605*207e5cccSFangrui Song // 606*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_hor_za128_s64_1ju10__SVBool_tu11__SVInt64_t( 607*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 608*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 609*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 610*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv2i64(i32 15, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 611*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 612*207e5cccSFangrui Song // 613*207e5cccSFangrui Song void test_svwrite_hor_za128_s64_1(uint32_t slice_base, svbool_t pg, svint64_t zn) __arm_streaming __arm_inout("za") { 614*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _s64, _m)(15, slice_base, pg, zn); 615*207e5cccSFangrui Song } 616*207e5cccSFangrui Song 617*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_u8( 618*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 619*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 620*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 621*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 622*207e5cccSFangrui Song // 623*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_hor_za128_u8ju10__SVBool_tu11__SVUint8_t( 624*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 625*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 626*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 627*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 628*207e5cccSFangrui Song // 629*207e5cccSFangrui Song void test_svwrite_hor_za128_u8(uint32_t slice_base, svbool_t pg, svuint8_t zn) __arm_streaming __arm_inout("za") { 630*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _u8, _m)(0, slice_base, pg, zn); 631*207e5cccSFangrui Song } 632*207e5cccSFangrui Song 633*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_u8_1( 634*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 635*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 636*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv16i8(i32 15, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 637*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 638*207e5cccSFangrui Song // 639*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_hor_za128_u8_1ju10__SVBool_tu11__SVUint8_t( 640*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 641*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 642*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv16i8(i32 15, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 643*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 644*207e5cccSFangrui Song // 645*207e5cccSFangrui Song void test_svwrite_hor_za128_u8_1(uint32_t slice_base, svbool_t pg, svuint8_t zn) __arm_streaming __arm_inout("za") { 646*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _u8, _m)(15, slice_base, pg, zn); 647*207e5cccSFangrui Song } 648*207e5cccSFangrui Song 649*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_u16( 650*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 651*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 652*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 653*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 654*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 655*207e5cccSFangrui Song // 656*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_hor_za128_u16ju10__SVBool_tu12__SVUint16_t( 657*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 658*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 659*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 660*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 661*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 662*207e5cccSFangrui Song // 663*207e5cccSFangrui Song void test_svwrite_hor_za128_u16(uint32_t slice_base, svbool_t pg, svuint16_t zn) __arm_streaming __arm_inout("za") { 664*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _u16, _m)(0, slice_base, pg, zn); 665*207e5cccSFangrui Song } 666*207e5cccSFangrui Song 667*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_u16_1( 668*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 669*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 670*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 671*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8i16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 672*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 673*207e5cccSFangrui Song // 674*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_hor_za128_u16_1ju10__SVBool_tu12__SVUint16_t( 675*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 676*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 677*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 678*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8i16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 679*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 680*207e5cccSFangrui Song // 681*207e5cccSFangrui Song void test_svwrite_hor_za128_u16_1(uint32_t slice_base, svbool_t pg, svuint16_t zn) __arm_streaming __arm_inout("za") { 682*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _u16, _m)(15, slice_base, pg, zn); 683*207e5cccSFangrui Song } 684*207e5cccSFangrui Song 685*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_u32( 686*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 687*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 688*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 689*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 690*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 691*207e5cccSFangrui Song // 692*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_hor_za128_u32ju10__SVBool_tu12__SVUint32_t( 693*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 694*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 695*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 696*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 697*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 698*207e5cccSFangrui Song // 699*207e5cccSFangrui Song void test_svwrite_hor_za128_u32(uint32_t slice_base, svbool_t pg, svuint32_t zn) __arm_streaming __arm_inout("za") { 700*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _u32, _m)(0, slice_base, pg, zn); 701*207e5cccSFangrui Song } 702*207e5cccSFangrui Song 703*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_u32_1( 704*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 705*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 706*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 707*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv4i32(i32 15, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 708*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 709*207e5cccSFangrui Song // 710*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_hor_za128_u32_1ju10__SVBool_tu12__SVUint32_t( 711*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 712*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 713*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 714*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv4i32(i32 15, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 715*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 716*207e5cccSFangrui Song // 717*207e5cccSFangrui Song void test_svwrite_hor_za128_u32_1(uint32_t slice_base, svbool_t pg, svuint32_t zn) __arm_streaming __arm_inout("za") { 718*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _u32, _m)(15, slice_base, pg, zn); 719*207e5cccSFangrui Song } 720*207e5cccSFangrui Song 721*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_u64( 722*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 723*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 724*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 725*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 726*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 727*207e5cccSFangrui Song // 728*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_hor_za128_u64ju10__SVBool_tu12__SVUint64_t( 729*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 730*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 731*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 732*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 733*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 734*207e5cccSFangrui Song // 735*207e5cccSFangrui Song void test_svwrite_hor_za128_u64(uint32_t slice_base, svbool_t pg, svuint64_t zn) __arm_streaming __arm_inout("za") { 736*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _u64, _m)(0, slice_base, pg, zn); 737*207e5cccSFangrui Song } 738*207e5cccSFangrui Song 739*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_u64_1( 740*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 741*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 742*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 743*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv2i64(i32 15, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 744*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 745*207e5cccSFangrui Song // 746*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_hor_za128_u64_1ju10__SVBool_tu12__SVUint64_t( 747*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 748*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 749*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 750*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv2i64(i32 15, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 751*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 752*207e5cccSFangrui Song // 753*207e5cccSFangrui Song void test_svwrite_hor_za128_u64_1(uint32_t slice_base, svbool_t pg, svuint64_t zn) __arm_streaming __arm_inout("za") { 754*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _u64, _m)(15, slice_base, pg, zn); 755*207e5cccSFangrui Song } 756*207e5cccSFangrui Song 757*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_f16( 758*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 759*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 760*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 761*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8f16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 762*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 763*207e5cccSFangrui Song // 764*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_hor_za128_f16ju10__SVBool_tu13__SVFloat16_t( 765*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 766*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 767*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 768*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8f16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 769*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 770*207e5cccSFangrui Song // 771*207e5cccSFangrui Song void test_svwrite_hor_za128_f16(uint32_t slice_base, svbool_t pg, svfloat16_t zn) __arm_streaming __arm_inout("za") { 772*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _f16, _m)(0, slice_base, pg, zn); 773*207e5cccSFangrui Song } 774*207e5cccSFangrui Song 775*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_f16_1( 776*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 777*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 778*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 779*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8f16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 780*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 781*207e5cccSFangrui Song // 782*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_hor_za128_f16_1ju10__SVBool_tu13__SVFloat16_t( 783*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 784*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 785*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 786*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8f16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 787*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 788*207e5cccSFangrui Song // 789*207e5cccSFangrui Song void test_svwrite_hor_za128_f16_1(uint32_t slice_base, svbool_t pg, svfloat16_t zn) __arm_streaming __arm_inout("za") { 790*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _f16, _m)(15, slice_base, pg, zn); 791*207e5cccSFangrui Song } 792*207e5cccSFangrui Song 793*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_bf16( 794*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 795*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 796*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 797*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8bf16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 798*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 799*207e5cccSFangrui Song // 800*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_hor_za128_bf16ju10__SVBool_tu14__SVBfloat16_t( 801*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 802*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 803*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 804*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8bf16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 805*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 806*207e5cccSFangrui Song // 807*207e5cccSFangrui Song void test_svwrite_hor_za128_bf16(uint32_t slice_base, svbool_t pg, svbfloat16_t zn) __arm_streaming __arm_inout("za") { 808*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _bf16, _m)(0, slice_base, pg, zn); 809*207e5cccSFangrui Song } 810*207e5cccSFangrui Song 811*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_bf16_1( 812*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 813*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 814*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 815*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8bf16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 816*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 817*207e5cccSFangrui Song // 818*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z29test_svwrite_hor_za128_bf16_1ju10__SVBool_tu14__SVBfloat16_t( 819*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 820*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 821*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 822*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv8bf16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 823*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 824*207e5cccSFangrui Song // 825*207e5cccSFangrui Song void test_svwrite_hor_za128_bf16_1(uint32_t slice_base, svbool_t pg, svbfloat16_t zn) __arm_streaming __arm_inout("za") { 826*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _bf16, _m)(15, slice_base, pg, zn); 827*207e5cccSFangrui Song } 828*207e5cccSFangrui Song 829*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_f32( 830*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 831*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 832*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 833*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv4f32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 834*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 835*207e5cccSFangrui Song // 836*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_hor_za128_f32ju10__SVBool_tu13__SVFloat32_t( 837*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 838*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 839*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 840*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv4f32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 841*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 842*207e5cccSFangrui Song // 843*207e5cccSFangrui Song void test_svwrite_hor_za128_f32(uint32_t slice_base, svbool_t pg, svfloat32_t zn) __arm_streaming __arm_inout("za") { 844*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _f32, _m)(0, slice_base, pg, zn); 845*207e5cccSFangrui Song } 846*207e5cccSFangrui Song 847*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_f32_1( 848*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 849*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 850*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 851*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv4f32(i32 15, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 852*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 853*207e5cccSFangrui Song // 854*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_hor_za128_f32_1ju10__SVBool_tu13__SVFloat32_t( 855*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 856*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 857*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 858*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv4f32(i32 15, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 859*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 860*207e5cccSFangrui Song // 861*207e5cccSFangrui Song void test_svwrite_hor_za128_f32_1(uint32_t slice_base, svbool_t pg, svfloat32_t zn) __arm_streaming __arm_inout("za") { 862*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _f32, _m)(15, slice_base, pg, zn); 863*207e5cccSFangrui Song } 864*207e5cccSFangrui Song 865*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_f64( 866*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 867*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 868*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 869*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv2f64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 870*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 871*207e5cccSFangrui Song // 872*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_hor_za128_f64ju10__SVBool_tu13__SVFloat64_t( 873*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 874*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 875*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 876*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv2f64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 877*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 878*207e5cccSFangrui Song // 879*207e5cccSFangrui Song void test_svwrite_hor_za128_f64(uint32_t slice_base, svbool_t pg, svfloat64_t zn) __arm_streaming __arm_inout("za") { 880*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _f64, _m)(0, slice_base, pg, zn); 881*207e5cccSFangrui Song } 882*207e5cccSFangrui Song 883*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_hor_za128_f64_1( 884*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 885*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 886*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 887*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv2f64(i32 15, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 888*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 889*207e5cccSFangrui Song // 890*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_hor_za128_f64_1ju10__SVBool_tu13__SVFloat64_t( 891*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 892*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 893*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 894*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.horiz.nxv2f64(i32 15, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 895*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 896*207e5cccSFangrui Song // 897*207e5cccSFangrui Song void test_svwrite_hor_za128_f64_1(uint32_t slice_base, svbool_t pg, svfloat64_t zn) __arm_streaming __arm_inout("za") { 898*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_hor_za128, _f64, _m)(15, slice_base, pg, zn); 899*207e5cccSFangrui Song } 900*207e5cccSFangrui Song 901*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za8_s8( 902*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 903*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 904*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 905*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 906*207e5cccSFangrui Song // 907*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z23test_svwrite_ver_za8_s8ju10__SVBool_tu10__SVInt8_t( 908*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 909*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 910*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 911*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 912*207e5cccSFangrui Song // 913*207e5cccSFangrui Song void test_svwrite_ver_za8_s8(uint32_t slice_base, svbool_t pg, svint8_t zn) __arm_streaming __arm_inout("za") { 914*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za8, _s8, _m)(0, slice_base, pg, zn); 915*207e5cccSFangrui Song } 916*207e5cccSFangrui Song 917*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za8_s8_1( 918*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 919*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 920*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 15 921*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv16i8(i32 0, i32 [[ADD]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 922*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 923*207e5cccSFangrui Song // 924*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_ver_za8_s8_1ju10__SVBool_tu10__SVInt8_t( 925*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 926*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 927*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 15 928*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv16i8(i32 0, i32 [[ADD]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 929*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 930*207e5cccSFangrui Song // 931*207e5cccSFangrui Song void test_svwrite_ver_za8_s8_1(uint32_t slice_base, svbool_t pg, svint8_t zn) __arm_streaming __arm_inout("za") { 932*207e5cccSFangrui Song uint32_t slice = slice_base + 15; 933*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za8, _s8, _m)(0, slice, pg, zn); 934*207e5cccSFangrui Song } 935*207e5cccSFangrui Song 936*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za16_s16( 937*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 938*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 939*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 940*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 941*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 942*207e5cccSFangrui Song // 943*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_ver_za16_s16ju10__SVBool_tu11__SVInt16_t( 944*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 945*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 946*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 947*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 948*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 949*207e5cccSFangrui Song // 950*207e5cccSFangrui Song void test_svwrite_ver_za16_s16(uint32_t slice_base, svbool_t pg, svint16_t zn) __arm_streaming __arm_inout("za") { 951*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za16, _s16, _m)(0, slice_base, pg, zn); 952*207e5cccSFangrui Song } 953*207e5cccSFangrui Song 954*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za16_s16_1( 955*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 956*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 957*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 958*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 959*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8i16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 960*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 961*207e5cccSFangrui Song // 962*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_ver_za16_s16_1ju10__SVBool_tu11__SVInt16_t( 963*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 964*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 965*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 966*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 967*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8i16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 968*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 969*207e5cccSFangrui Song // 970*207e5cccSFangrui Song void test_svwrite_ver_za16_s16_1(uint32_t slice_base, svbool_t pg, svint16_t zn) __arm_streaming __arm_inout("za") { 971*207e5cccSFangrui Song uint32_t slice = slice_base + 7; 972*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za16, _s16, _m)(1, slice, pg, zn); 973*207e5cccSFangrui Song } 974*207e5cccSFangrui Song 975*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za32_s32( 976*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 977*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 978*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 979*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 980*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 981*207e5cccSFangrui Song // 982*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_ver_za32_s32ju10__SVBool_tu11__SVInt32_t( 983*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 984*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 985*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 986*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 987*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 988*207e5cccSFangrui Song // 989*207e5cccSFangrui Song void test_svwrite_ver_za32_s32(uint32_t slice_base, svbool_t pg, svint32_t zn) __arm_streaming __arm_inout("za") { 990*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za32, _s32, _m)(0, slice_base, pg, zn); 991*207e5cccSFangrui Song } 992*207e5cccSFangrui Song 993*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za32_s32_1( 994*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 995*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 996*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 3 997*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 998*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv4i32(i32 3, i32 [[ADD]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 999*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1000*207e5cccSFangrui Song // 1001*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_ver_za32_s32_1ju10__SVBool_tu11__SVInt32_t( 1002*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1003*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1004*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 3 1005*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1006*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv4i32(i32 3, i32 [[ADD]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 1007*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1008*207e5cccSFangrui Song // 1009*207e5cccSFangrui Song void test_svwrite_ver_za32_s32_1(uint32_t slice_base, svbool_t pg, svint32_t zn) __arm_streaming __arm_inout("za") { 1010*207e5cccSFangrui Song uint32_t slice = slice_base + 3; 1011*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za32, _s32, _m)(3, slice, pg, zn); 1012*207e5cccSFangrui Song } 1013*207e5cccSFangrui Song 1014*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za64_s64( 1015*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1016*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1017*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1018*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1019*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1020*207e5cccSFangrui Song // 1021*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_ver_za64_s64ju10__SVBool_tu11__SVInt64_t( 1022*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1023*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1024*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1025*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1026*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1027*207e5cccSFangrui Song // 1028*207e5cccSFangrui Song void test_svwrite_ver_za64_s64(uint32_t slice_base, svbool_t pg, svint64_t zn) __arm_streaming __arm_inout("za") { 1029*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za64, _s64, _m)(0, slice_base, pg, zn); 1030*207e5cccSFangrui Song } 1031*207e5cccSFangrui Song 1032*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za64_s64_1( 1033*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1034*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1035*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 1 1036*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1037*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv2i64(i32 7, i32 [[ADD]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1038*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1039*207e5cccSFangrui Song // 1040*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_ver_za64_s64_1ju10__SVBool_tu11__SVInt64_t( 1041*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1042*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1043*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 1 1044*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1045*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv2i64(i32 7, i32 [[ADD]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1046*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1047*207e5cccSFangrui Song // 1048*207e5cccSFangrui Song void test_svwrite_ver_za64_s64_1(uint32_t slice_base, svbool_t pg, svint64_t zn) __arm_streaming __arm_inout("za") { 1049*207e5cccSFangrui Song uint32_t slice = slice_base + 1; 1050*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za64, _s64, _m)(7, slice, pg, zn); 1051*207e5cccSFangrui Song } 1052*207e5cccSFangrui Song 1053*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za8_u8( 1054*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1055*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1056*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 1057*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1058*207e5cccSFangrui Song // 1059*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z23test_svwrite_ver_za8_u8ju10__SVBool_tu11__SVUint8_t( 1060*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1061*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1062*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 1063*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1064*207e5cccSFangrui Song // 1065*207e5cccSFangrui Song void test_svwrite_ver_za8_u8(uint32_t slice_base, svbool_t pg, svuint8_t zn) __arm_streaming __arm_inout("za") { 1066*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za8, _u8, _m)(0, slice_base, pg, zn); 1067*207e5cccSFangrui Song } 1068*207e5cccSFangrui Song 1069*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za8_u8_1( 1070*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1071*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1072*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 15 1073*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv16i8(i32 0, i32 [[ADD]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 1074*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1075*207e5cccSFangrui Song // 1076*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_ver_za8_u8_1ju10__SVBool_tu11__SVUint8_t( 1077*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1078*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1079*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 15 1080*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv16i8(i32 0, i32 [[ADD]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 1081*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1082*207e5cccSFangrui Song // 1083*207e5cccSFangrui Song void test_svwrite_ver_za8_u8_1(uint32_t slice_base, svbool_t pg, svuint8_t zn) __arm_streaming __arm_inout("za") { 1084*207e5cccSFangrui Song uint32_t slice = slice_base + 15; 1085*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za8, _u8, _m)(0, slice, pg, zn); 1086*207e5cccSFangrui Song } 1087*207e5cccSFangrui Song 1088*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za16_u16( 1089*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1090*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1091*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1092*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 1093*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1094*207e5cccSFangrui Song // 1095*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_ver_za16_u16ju10__SVBool_tu12__SVUint16_t( 1096*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1097*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1098*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1099*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 1100*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1101*207e5cccSFangrui Song // 1102*207e5cccSFangrui Song void test_svwrite_ver_za16_u16(uint32_t slice_base, svbool_t pg, svuint16_t zn) __arm_streaming __arm_inout("za") { 1103*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za16, _u16, _m)(0, slice_base, pg, zn); 1104*207e5cccSFangrui Song } 1105*207e5cccSFangrui Song 1106*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za16_u16_1( 1107*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1108*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1109*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 1110*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1111*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8i16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 1112*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1113*207e5cccSFangrui Song // 1114*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_ver_za16_u16_1ju10__SVBool_tu12__SVUint16_t( 1115*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1116*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1117*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 1118*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1119*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8i16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 1120*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1121*207e5cccSFangrui Song // 1122*207e5cccSFangrui Song void test_svwrite_ver_za16_u16_1(uint32_t slice_base, svbool_t pg, svuint16_t zn) __arm_streaming __arm_inout("za") { 1123*207e5cccSFangrui Song uint32_t slice = slice_base + 7; 1124*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za16, _u16, _m)(1, slice, pg, zn); 1125*207e5cccSFangrui Song } 1126*207e5cccSFangrui Song 1127*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za32_u32( 1128*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1129*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1130*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1131*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 1132*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1133*207e5cccSFangrui Song // 1134*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_ver_za32_u32ju10__SVBool_tu12__SVUint32_t( 1135*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1136*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1137*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1138*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 1139*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1140*207e5cccSFangrui Song // 1141*207e5cccSFangrui Song void test_svwrite_ver_za32_u32(uint32_t slice_base, svbool_t pg, svuint32_t zn) __arm_streaming __arm_inout("za") { 1142*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za32, _u32, _m)(0, slice_base, pg, zn); 1143*207e5cccSFangrui Song } 1144*207e5cccSFangrui Song 1145*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za32_u32_1( 1146*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1147*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1148*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 3 1149*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1150*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv4i32(i32 3, i32 [[ADD]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 1151*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1152*207e5cccSFangrui Song // 1153*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_ver_za32_u32_1ju10__SVBool_tu12__SVUint32_t( 1154*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1155*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1156*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 3 1157*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1158*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv4i32(i32 3, i32 [[ADD]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 1159*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1160*207e5cccSFangrui Song // 1161*207e5cccSFangrui Song void test_svwrite_ver_za32_u32_1(uint32_t slice_base, svbool_t pg, svuint32_t zn) __arm_streaming __arm_inout("za") { 1162*207e5cccSFangrui Song uint32_t slice = slice_base + 3; 1163*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za32, _u32, _m)(3, slice, pg, zn); 1164*207e5cccSFangrui Song } 1165*207e5cccSFangrui Song 1166*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za64_u64( 1167*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1168*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1169*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1170*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1171*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1172*207e5cccSFangrui Song // 1173*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_ver_za64_u64ju10__SVBool_tu12__SVUint64_t( 1174*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1175*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1176*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1177*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1178*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1179*207e5cccSFangrui Song // 1180*207e5cccSFangrui Song void test_svwrite_ver_za64_u64(uint32_t slice_base, svbool_t pg, svuint64_t zn) __arm_streaming __arm_inout("za") { 1181*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za64, _u64, _m)(0, slice_base, pg, zn); 1182*207e5cccSFangrui Song } 1183*207e5cccSFangrui Song 1184*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za64_u64_1( 1185*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1186*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1187*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 1 1188*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1189*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv2i64(i32 7, i32 [[ADD]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1190*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1191*207e5cccSFangrui Song // 1192*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_ver_za64_u64_1ju10__SVBool_tu12__SVUint64_t( 1193*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1194*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1195*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 1 1196*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1197*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv2i64(i32 7, i32 [[ADD]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1198*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1199*207e5cccSFangrui Song // 1200*207e5cccSFangrui Song void test_svwrite_ver_za64_u64_1(uint32_t slice_base, svbool_t pg, svuint64_t zn) __arm_streaming __arm_inout("za") { 1201*207e5cccSFangrui Song uint32_t slice = slice_base + 1; 1202*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za64, _u64, _m)(7, slice, pg, zn); 1203*207e5cccSFangrui Song } 1204*207e5cccSFangrui Song 1205*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za16_f16( 1206*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1207*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1208*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1209*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8f16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 1210*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1211*207e5cccSFangrui Song // 1212*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_ver_za16_f16ju10__SVBool_tu13__SVFloat16_t( 1213*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1214*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1215*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1216*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8f16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 1217*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1218*207e5cccSFangrui Song // 1219*207e5cccSFangrui Song void test_svwrite_ver_za16_f16(uint32_t slice_base, svbool_t pg, svfloat16_t zn) __arm_streaming __arm_inout("za") { 1220*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za16, _f16, _m)(0, slice_base, pg, zn); 1221*207e5cccSFangrui Song } 1222*207e5cccSFangrui Song 1223*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za16_f16_1( 1224*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1225*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1226*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 1227*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1228*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8f16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 1229*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1230*207e5cccSFangrui Song // 1231*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_ver_za16_f16_1ju10__SVBool_tu13__SVFloat16_t( 1232*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1233*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1234*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 1235*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1236*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8f16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 1237*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1238*207e5cccSFangrui Song // 1239*207e5cccSFangrui Song void test_svwrite_ver_za16_f16_1(uint32_t slice_base, svbool_t pg, svfloat16_t zn) __arm_streaming __arm_inout("za") { 1240*207e5cccSFangrui Song uint32_t slice = slice_base + 7; 1241*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za16, _f16, _m)(1, slice, pg, zn); 1242*207e5cccSFangrui Song } 1243*207e5cccSFangrui Song 1244*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za16_bf16( 1245*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1246*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1247*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1248*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8bf16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 1249*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1250*207e5cccSFangrui Song // 1251*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_ver_za16_bf16ju10__SVBool_tu14__SVBfloat16_t( 1252*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1253*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1254*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1255*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8bf16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 1256*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1257*207e5cccSFangrui Song // 1258*207e5cccSFangrui Song void test_svwrite_ver_za16_bf16(uint32_t slice_base, svbool_t pg, svbfloat16_t zn) __arm_streaming __arm_inout("za") { 1259*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za16, _bf16, _m)(0, slice_base, pg, zn); 1260*207e5cccSFangrui Song } 1261*207e5cccSFangrui Song 1262*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za16_bf16_1( 1263*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1264*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1265*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 1266*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1267*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8bf16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 1268*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1269*207e5cccSFangrui Song // 1270*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_ver_za16_bf16_1ju10__SVBool_tu14__SVBfloat16_t( 1271*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1272*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1273*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 7 1274*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1275*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv8bf16(i32 1, i32 [[ADD]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 1276*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1277*207e5cccSFangrui Song // 1278*207e5cccSFangrui Song void test_svwrite_ver_za16_bf16_1(uint32_t slice_base, svbool_t pg, svbfloat16_t zn) __arm_streaming __arm_inout("za") { 1279*207e5cccSFangrui Song uint32_t slice = slice_base + 7; 1280*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za16, _bf16, _m)(1, slice, pg, zn); 1281*207e5cccSFangrui Song } 1282*207e5cccSFangrui Song 1283*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za32_f32( 1284*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1285*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1286*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1287*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv4f32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 1288*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1289*207e5cccSFangrui Song // 1290*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_ver_za32_f32ju10__SVBool_tu13__SVFloat32_t( 1291*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1292*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1293*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1294*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv4f32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 1295*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1296*207e5cccSFangrui Song // 1297*207e5cccSFangrui Song void test_svwrite_ver_za32_f32(uint32_t slice_base, svbool_t pg, svfloat32_t zn) __arm_streaming __arm_inout("za") { 1298*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za32, _f32, _m)(0, slice_base, pg, zn); 1299*207e5cccSFangrui Song } 1300*207e5cccSFangrui Song 1301*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za32_f32_1( 1302*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1303*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1304*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 3 1305*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1306*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv4f32(i32 3, i32 [[ADD]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 1307*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1308*207e5cccSFangrui Song // 1309*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_ver_za32_f32_1ju10__SVBool_tu13__SVFloat32_t( 1310*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1311*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1312*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 3 1313*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1314*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv4f32(i32 3, i32 [[ADD]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 1315*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1316*207e5cccSFangrui Song // 1317*207e5cccSFangrui Song void test_svwrite_ver_za32_f32_1(uint32_t slice_base, svbool_t pg, svfloat32_t zn) __arm_streaming __arm_inout("za") { 1318*207e5cccSFangrui Song uint32_t slice = slice_base + 3; 1319*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za32, _f32, _m)(3, slice, pg, zn); 1320*207e5cccSFangrui Song } 1321*207e5cccSFangrui Song 1322*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za64_f64( 1323*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1324*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1325*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1326*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv2f64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 1327*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1328*207e5cccSFangrui Song // 1329*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_ver_za64_f64ju10__SVBool_tu13__SVFloat64_t( 1330*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1331*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1332*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1333*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv2f64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 1334*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1335*207e5cccSFangrui Song // 1336*207e5cccSFangrui Song void test_svwrite_ver_za64_f64(uint32_t slice_base, svbool_t pg, svfloat64_t zn) __arm_streaming __arm_inout("za") { 1337*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za64, _f64, _m)(0, slice_base, pg, zn); 1338*207e5cccSFangrui Song } 1339*207e5cccSFangrui Song 1340*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za64_f64_1( 1341*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1342*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1343*207e5cccSFangrui Song // CHECK-C-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 1 1344*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1345*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv2f64(i32 7, i32 [[ADD]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 1346*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1347*207e5cccSFangrui Song // 1348*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_ver_za64_f64_1ju10__SVBool_tu13__SVFloat64_t( 1349*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1350*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1351*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[ADD:%.*]] = add i32 [[SLICE_BASE]], 1 1352*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1353*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.write.vert.nxv2f64(i32 7, i32 [[ADD]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 1354*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1355*207e5cccSFangrui Song // 1356*207e5cccSFangrui Song void test_svwrite_ver_za64_f64_1(uint32_t slice_base, svbool_t pg, svfloat64_t zn) __arm_streaming __arm_inout("za") { 1357*207e5cccSFangrui Song uint32_t slice = slice_base + 1; 1358*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za64, _f64, _m)(7, slice, pg, zn); 1359*207e5cccSFangrui Song } 1360*207e5cccSFangrui Song 1361*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_s8( 1362*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1363*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1364*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 1365*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1366*207e5cccSFangrui Song // 1367*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_ver_za128_s8ju10__SVBool_tu10__SVInt8_t( 1368*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1369*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1370*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 1371*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1372*207e5cccSFangrui Song // 1373*207e5cccSFangrui Song void test_svwrite_ver_za128_s8(uint32_t slice_base, svbool_t pg, svint8_t zn) __arm_streaming __arm_inout("za") { 1374*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _s8, _m)(0, slice_base, pg, zn); 1375*207e5cccSFangrui Song } 1376*207e5cccSFangrui Song 1377*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_s8_1( 1378*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1379*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1380*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv16i8(i32 15, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 1381*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1382*207e5cccSFangrui Song // 1383*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_ver_za128_s8_1ju10__SVBool_tu10__SVInt8_t( 1384*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1385*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1386*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv16i8(i32 15, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 1387*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1388*207e5cccSFangrui Song // 1389*207e5cccSFangrui Song void test_svwrite_ver_za128_s8_1(uint32_t slice_base, svbool_t pg, svint8_t zn) __arm_streaming __arm_inout("za") { 1390*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _s8, _m)(15, slice_base, pg, zn); 1391*207e5cccSFangrui Song } 1392*207e5cccSFangrui Song 1393*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_s16( 1394*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1395*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1396*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1397*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 1398*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1399*207e5cccSFangrui Song // 1400*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_ver_za128_s16ju10__SVBool_tu11__SVInt16_t( 1401*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1402*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1403*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1404*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 1405*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1406*207e5cccSFangrui Song // 1407*207e5cccSFangrui Song void test_svwrite_ver_za128_s16(uint32_t slice_base, svbool_t pg, svint16_t zn) __arm_streaming __arm_inout("za") { 1408*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _s16, _m)(0, slice_base, pg, zn); 1409*207e5cccSFangrui Song } 1410*207e5cccSFangrui Song 1411*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_s16_1( 1412*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1413*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1414*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1415*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8i16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 1416*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1417*207e5cccSFangrui Song // 1418*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_ver_za128_s16_1ju10__SVBool_tu11__SVInt16_t( 1419*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1420*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1421*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1422*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8i16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 1423*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1424*207e5cccSFangrui Song // 1425*207e5cccSFangrui Song void test_svwrite_ver_za128_s16_1(uint32_t slice_base, svbool_t pg, svint16_t zn) __arm_streaming __arm_inout("za") { 1426*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _s16, _m)(15, slice_base, pg, zn); 1427*207e5cccSFangrui Song } 1428*207e5cccSFangrui Song 1429*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_s32( 1430*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1431*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1432*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1433*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 1434*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1435*207e5cccSFangrui Song // 1436*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_ver_za128_s32ju10__SVBool_tu11__SVInt32_t( 1437*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1438*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1439*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1440*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 1441*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1442*207e5cccSFangrui Song // 1443*207e5cccSFangrui Song void test_svwrite_ver_za128_s32(uint32_t slice_base, svbool_t pg, svint32_t zn) __arm_streaming __arm_inout("za") { 1444*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _s32, _m)(0, slice_base, pg, zn); 1445*207e5cccSFangrui Song } 1446*207e5cccSFangrui Song 1447*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_s32_1( 1448*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1449*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1450*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1451*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv4i32(i32 15, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 1452*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1453*207e5cccSFangrui Song // 1454*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_ver_za128_s32_1ju10__SVBool_tu11__SVInt32_t( 1455*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1456*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1457*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1458*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv4i32(i32 15, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 1459*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1460*207e5cccSFangrui Song // 1461*207e5cccSFangrui Song void test_svwrite_ver_za128_s32_1(uint32_t slice_base, svbool_t pg, svint32_t zn) __arm_streaming __arm_inout("za") { 1462*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _s32, _m)(15, slice_base, pg, zn); 1463*207e5cccSFangrui Song } 1464*207e5cccSFangrui Song 1465*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_s64( 1466*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1467*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1468*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1469*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1470*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1471*207e5cccSFangrui Song // 1472*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_ver_za128_s64ju10__SVBool_tu11__SVInt64_t( 1473*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1474*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1475*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1476*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1477*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1478*207e5cccSFangrui Song // 1479*207e5cccSFangrui Song void test_svwrite_ver_za128_s64(uint32_t slice_base, svbool_t pg, svint64_t zn) __arm_streaming __arm_inout("za") { 1480*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _s64, _m)(0, slice_base, pg, zn); 1481*207e5cccSFangrui Song } 1482*207e5cccSFangrui Song 1483*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_s64_1( 1484*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1485*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1486*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1487*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv2i64(i32 15, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1488*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1489*207e5cccSFangrui Song // 1490*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_ver_za128_s64_1ju10__SVBool_tu11__SVInt64_t( 1491*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1492*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1493*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1494*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv2i64(i32 15, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1495*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1496*207e5cccSFangrui Song // 1497*207e5cccSFangrui Song void test_svwrite_ver_za128_s64_1(uint32_t slice_base, svbool_t pg, svint64_t zn) __arm_streaming __arm_inout("za") { 1498*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _s64, _m)(15, slice_base, pg, zn); 1499*207e5cccSFangrui Song } 1500*207e5cccSFangrui Song 1501*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_u8( 1502*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1503*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1504*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 1505*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1506*207e5cccSFangrui Song // 1507*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z25test_svwrite_ver_za128_u8ju10__SVBool_tu11__SVUint8_t( 1508*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1509*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1510*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv16i8(i32 0, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 1511*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1512*207e5cccSFangrui Song // 1513*207e5cccSFangrui Song void test_svwrite_ver_za128_u8(uint32_t slice_base, svbool_t pg, svuint8_t zn) __arm_streaming __arm_inout("za") { 1514*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _u8, _m)(0, slice_base, pg, zn); 1515*207e5cccSFangrui Song } 1516*207e5cccSFangrui Song 1517*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_u8_1( 1518*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1519*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1520*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv16i8(i32 15, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 1521*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1522*207e5cccSFangrui Song // 1523*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_ver_za128_u8_1ju10__SVBool_tu11__SVUint8_t( 1524*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1525*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1526*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv16i8(i32 15, i32 [[SLICE_BASE]], <vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[ZN]]) 1527*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1528*207e5cccSFangrui Song // 1529*207e5cccSFangrui Song void test_svwrite_ver_za128_u8_1(uint32_t slice_base, svbool_t pg, svuint8_t zn) __arm_streaming __arm_inout("za") { 1530*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _u8, _m)(15, slice_base, pg, zn); 1531*207e5cccSFangrui Song } 1532*207e5cccSFangrui Song 1533*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_u16( 1534*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1535*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1536*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1537*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 1538*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1539*207e5cccSFangrui Song // 1540*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_ver_za128_u16ju10__SVBool_tu12__SVUint16_t( 1541*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1542*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1543*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1544*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8i16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 1545*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1546*207e5cccSFangrui Song // 1547*207e5cccSFangrui Song void test_svwrite_ver_za128_u16(uint32_t slice_base, svbool_t pg, svuint16_t zn) __arm_streaming __arm_inout("za") { 1548*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _u16, _m)(0, slice_base, pg, zn); 1549*207e5cccSFangrui Song } 1550*207e5cccSFangrui Song 1551*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_u16_1( 1552*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1553*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1554*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1555*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8i16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 1556*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1557*207e5cccSFangrui Song // 1558*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_ver_za128_u16_1ju10__SVBool_tu12__SVUint16_t( 1559*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x i16> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1560*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1561*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1562*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8i16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[ZN]]) 1563*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1564*207e5cccSFangrui Song // 1565*207e5cccSFangrui Song void test_svwrite_ver_za128_u16_1(uint32_t slice_base, svbool_t pg, svuint16_t zn) __arm_streaming __arm_inout("za") { 1566*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _u16, _m)(15, slice_base, pg, zn); 1567*207e5cccSFangrui Song } 1568*207e5cccSFangrui Song 1569*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_u32( 1570*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1571*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1572*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1573*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 1574*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1575*207e5cccSFangrui Song // 1576*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_ver_za128_u32ju10__SVBool_tu12__SVUint32_t( 1577*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1578*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1579*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1580*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv4i32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 1581*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1582*207e5cccSFangrui Song // 1583*207e5cccSFangrui Song void test_svwrite_ver_za128_u32(uint32_t slice_base, svbool_t pg, svuint32_t zn) __arm_streaming __arm_inout("za") { 1584*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _u32, _m)(0, slice_base, pg, zn); 1585*207e5cccSFangrui Song } 1586*207e5cccSFangrui Song 1587*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_u32_1( 1588*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1589*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1590*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1591*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv4i32(i32 15, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 1592*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1593*207e5cccSFangrui Song // 1594*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_ver_za128_u32_1ju10__SVBool_tu12__SVUint32_t( 1595*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x i32> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1596*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1597*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1598*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv4i32(i32 15, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[ZN]]) 1599*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1600*207e5cccSFangrui Song // 1601*207e5cccSFangrui Song void test_svwrite_ver_za128_u32_1(uint32_t slice_base, svbool_t pg, svuint32_t zn) __arm_streaming __arm_inout("za") { 1602*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _u32, _m)(15, slice_base, pg, zn); 1603*207e5cccSFangrui Song } 1604*207e5cccSFangrui Song 1605*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_u64( 1606*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1607*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1608*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1609*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1610*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1611*207e5cccSFangrui Song // 1612*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_ver_za128_u64ju10__SVBool_tu12__SVUint64_t( 1613*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1614*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1615*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1616*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv2i64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1617*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1618*207e5cccSFangrui Song // 1619*207e5cccSFangrui Song void test_svwrite_ver_za128_u64(uint32_t slice_base, svbool_t pg, svuint64_t zn) __arm_streaming __arm_inout("za") { 1620*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _u64, _m)(0, slice_base, pg, zn); 1621*207e5cccSFangrui Song } 1622*207e5cccSFangrui Song 1623*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_u64_1( 1624*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1625*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1626*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1627*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv2i64(i32 15, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1628*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1629*207e5cccSFangrui Song // 1630*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_ver_za128_u64_1ju10__SVBool_tu12__SVUint64_t( 1631*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x i64> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1632*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1633*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1634*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv2i64(i32 15, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[ZN]]) 1635*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1636*207e5cccSFangrui Song // 1637*207e5cccSFangrui Song void test_svwrite_ver_za128_u64_1(uint32_t slice_base, svbool_t pg, svuint64_t zn) __arm_streaming __arm_inout("za") { 1638*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _u64, _m)(15, slice_base, pg, zn); 1639*207e5cccSFangrui Song } 1640*207e5cccSFangrui Song 1641*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_f16( 1642*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1643*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1644*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1645*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8f16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 1646*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1647*207e5cccSFangrui Song // 1648*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_ver_za128_f16ju10__SVBool_tu13__SVFloat16_t( 1649*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1650*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1651*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1652*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8f16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 1653*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1654*207e5cccSFangrui Song // 1655*207e5cccSFangrui Song void test_svwrite_ver_za128_f16(uint32_t slice_base, svbool_t pg, svfloat16_t zn) __arm_streaming __arm_inout("za") { 1656*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _f16, _m)(0, slice_base, pg, zn); 1657*207e5cccSFangrui Song } 1658*207e5cccSFangrui Song 1659*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_f16_1( 1660*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1661*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1662*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1663*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8f16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 1664*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1665*207e5cccSFangrui Song // 1666*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_ver_za128_f16_1ju10__SVBool_tu13__SVFloat16_t( 1667*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x half> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1668*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1669*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1670*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8f16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[ZN]]) 1671*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1672*207e5cccSFangrui Song // 1673*207e5cccSFangrui Song void test_svwrite_ver_za128_f16_1(uint32_t slice_base, svbool_t pg, svfloat16_t zn) __arm_streaming __arm_inout("za") { 1674*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _f16, _m)(15, slice_base, pg, zn); 1675*207e5cccSFangrui Song } 1676*207e5cccSFangrui Song 1677*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_bf16( 1678*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1679*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1680*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1681*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8bf16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 1682*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1683*207e5cccSFangrui Song // 1684*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z27test_svwrite_ver_za128_bf16ju10__SVBool_tu14__SVBfloat16_t( 1685*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1686*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1687*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1688*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8bf16(i32 0, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 1689*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1690*207e5cccSFangrui Song // 1691*207e5cccSFangrui Song void test_svwrite_ver_za128_bf16(uint32_t slice_base, svbool_t pg, svbfloat16_t zn) __arm_streaming __arm_inout("za") { 1692*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _bf16, _m)(0, slice_base, pg, zn); 1693*207e5cccSFangrui Song } 1694*207e5cccSFangrui Song 1695*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_bf16_1( 1696*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1697*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1698*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1699*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8bf16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 1700*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1701*207e5cccSFangrui Song // 1702*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z29test_svwrite_ver_za128_bf16_1ju10__SVBool_tu14__SVBfloat16_t( 1703*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 8 x bfloat> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1704*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1705*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG]]) 1706*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv8bf16(i32 15, i32 [[SLICE_BASE]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x bfloat> [[ZN]]) 1707*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1708*207e5cccSFangrui Song // 1709*207e5cccSFangrui Song void test_svwrite_ver_za128_bf16_1(uint32_t slice_base, svbool_t pg, svbfloat16_t zn) __arm_streaming __arm_inout("za") { 1710*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _bf16, _m)(15, slice_base, pg, zn); 1711*207e5cccSFangrui Song } 1712*207e5cccSFangrui Song 1713*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_f32( 1714*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1715*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1716*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1717*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv4f32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 1718*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1719*207e5cccSFangrui Song // 1720*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_ver_za128_f32ju10__SVBool_tu13__SVFloat32_t( 1721*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1722*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1723*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1724*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv4f32(i32 0, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 1725*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1726*207e5cccSFangrui Song // 1727*207e5cccSFangrui Song void test_svwrite_ver_za128_f32(uint32_t slice_base, svbool_t pg, svfloat32_t zn) __arm_streaming __arm_inout("za") { 1728*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _f32, _m)(0, slice_base, pg, zn); 1729*207e5cccSFangrui Song } 1730*207e5cccSFangrui Song 1731*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_f32_1( 1732*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1733*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1734*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1735*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv4f32(i32 15, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 1736*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1737*207e5cccSFangrui Song // 1738*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_ver_za128_f32_1ju10__SVBool_tu13__SVFloat32_t( 1739*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 4 x float> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1740*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1741*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG]]) 1742*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv4f32(i32 15, i32 [[SLICE_BASE]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[ZN]]) 1743*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1744*207e5cccSFangrui Song // 1745*207e5cccSFangrui Song void test_svwrite_ver_za128_f32_1(uint32_t slice_base, svbool_t pg, svfloat32_t zn) __arm_streaming __arm_inout("za") { 1746*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _f32, _m)(15, slice_base, pg, zn); 1747*207e5cccSFangrui Song } 1748*207e5cccSFangrui Song 1749*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_f64( 1750*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1751*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1752*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1753*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv2f64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 1754*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1755*207e5cccSFangrui Song // 1756*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z26test_svwrite_ver_za128_f64ju10__SVBool_tu13__SVFloat64_t( 1757*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1758*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1759*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1760*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv2f64(i32 0, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 1761*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1762*207e5cccSFangrui Song // 1763*207e5cccSFangrui Song void test_svwrite_ver_za128_f64(uint32_t slice_base, svbool_t pg, svfloat64_t zn) __arm_streaming __arm_inout("za") { 1764*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _f64, _m)(0, slice_base, pg, zn); 1765*207e5cccSFangrui Song } 1766*207e5cccSFangrui Song 1767*207e5cccSFangrui Song // CHECK-C-LABEL: define dso_local void @test_svwrite_ver_za128_f64_1( 1768*207e5cccSFangrui Song // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1769*207e5cccSFangrui Song // CHECK-C-NEXT: entry: 1770*207e5cccSFangrui Song // CHECK-C-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1771*207e5cccSFangrui Song // CHECK-C-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv2f64(i32 15, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 1772*207e5cccSFangrui Song // CHECK-C-NEXT: ret void 1773*207e5cccSFangrui Song // 1774*207e5cccSFangrui Song // CHECK-CXX-LABEL: define dso_local void @_Z28test_svwrite_ver_za128_f64_1ju10__SVBool_tu13__SVFloat64_t( 1775*207e5cccSFangrui Song // CHECK-CXX-SAME: i32 noundef [[SLICE_BASE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 2 x double> [[ZN:%.*]]) local_unnamed_addr #[[ATTR0]] { 1776*207e5cccSFangrui Song // CHECK-CXX-NEXT: entry: 1777*207e5cccSFangrui Song // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG]]) 1778*207e5cccSFangrui Song // CHECK-CXX-NEXT: tail call void @llvm.aarch64.sme.writeq.vert.nxv2f64(i32 15, i32 [[SLICE_BASE]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[ZN]]) 1779*207e5cccSFangrui Song // CHECK-CXX-NEXT: ret void 1780*207e5cccSFangrui Song // 1781*207e5cccSFangrui Song void test_svwrite_ver_za128_f64_1(uint32_t slice_base, svbool_t pg, svfloat64_t zn) __arm_streaming __arm_inout("za") { 1782*207e5cccSFangrui Song SME_ACLE_FUNC(svwrite_ver_za128, _f64, _m)(15, slice_base, pg, zn); 1783*207e5cccSFangrui Song } 1784*207e5cccSFangrui Song //// NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: 1785*207e5cccSFangrui Song // CHECK: {{.*}} 1786