1*207e5cccSFangrui Song // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py 2*207e5cccSFangrui Song // REQUIRES: aarch64-registered-target 3*207e5cccSFangrui Song // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s 4*207e5cccSFangrui Song // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK 5*207e5cccSFangrui Song // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s 6*207e5cccSFangrui Song // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK 7*207e5cccSFangrui Song // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s 8*207e5cccSFangrui Song // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s 9*207e5cccSFangrui Song 10*207e5cccSFangrui Song #include <arm_sve.h> 11*207e5cccSFangrui Song 12*207e5cccSFangrui Song #if defined __ARM_FEATURE_SME 13*207e5cccSFangrui Song #define MODE_ATTR __arm_streaming 14*207e5cccSFangrui Song #else 15*207e5cccSFangrui Song #define MODE_ATTR 16*207e5cccSFangrui Song #endif 17*207e5cccSFangrui Song 18*207e5cccSFangrui Song #ifdef SVE_OVERLOADED_FORMS 19*207e5cccSFangrui Song // A simple used,unused... macro, long enough to represent any SVE builtin. 20*207e5cccSFangrui Song #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 21*207e5cccSFangrui Song #else 22*207e5cccSFangrui Song #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4 23*207e5cccSFangrui Song #endif 24*207e5cccSFangrui Song 25*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_s8_z( 26*207e5cccSFangrui Song // CHECK-NEXT: entry: 27*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = select <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> zeroinitializer 28*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.nxv16i8(<vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[TMP0]], <vscale x 16 x i8> [[OP2:%.*]]) 29*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP1]] 30*207e5cccSFangrui Song // 31*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z15test_svasr_s8_zu10__SVBool_tu10__SVInt8_tu11__SVUint8_t( 32*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 33*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = select <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> zeroinitializer 34*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.nxv16i8(<vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[TMP0]], <vscale x 16 x i8> [[OP2:%.*]]) 35*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP1]] 36*207e5cccSFangrui Song // 37*207e5cccSFangrui Song svint8_t test_svasr_s8_z(svbool_t pg, svint8_t op1, svuint8_t op2) MODE_ATTR 38*207e5cccSFangrui Song { 39*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_s8,_z,)(pg, op1, op2); 40*207e5cccSFangrui Song } 41*207e5cccSFangrui Song 42*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_s16_z( 43*207e5cccSFangrui Song // CHECK-NEXT: entry: 44*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 45*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> zeroinitializer 46*207e5cccSFangrui Song // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[TMP1]], <vscale x 8 x i16> [[OP2:%.*]]) 47*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP2]] 48*207e5cccSFangrui Song // 49*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svasr_s16_zu10__SVBool_tu11__SVInt16_tu12__SVUint16_t( 50*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 51*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 52*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> zeroinitializer 53*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[TMP1]], <vscale x 8 x i16> [[OP2:%.*]]) 54*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP2]] 55*207e5cccSFangrui Song // 56*207e5cccSFangrui Song svint16_t test_svasr_s16_z(svbool_t pg, svint16_t op1, svuint16_t op2) MODE_ATTR 57*207e5cccSFangrui Song { 58*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_s16,_z,)(pg, op1, op2); 59*207e5cccSFangrui Song } 60*207e5cccSFangrui Song 61*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_s32_z( 62*207e5cccSFangrui Song // CHECK-NEXT: entry: 63*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 64*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> zeroinitializer 65*207e5cccSFangrui Song // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[TMP1]], <vscale x 4 x i32> [[OP2:%.*]]) 66*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP2]] 67*207e5cccSFangrui Song // 68*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svasr_s32_zu10__SVBool_tu11__SVInt32_tu12__SVUint32_t( 69*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 70*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 71*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> zeroinitializer 72*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[TMP1]], <vscale x 4 x i32> [[OP2:%.*]]) 73*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP2]] 74*207e5cccSFangrui Song // 75*207e5cccSFangrui Song svint32_t test_svasr_s32_z(svbool_t pg, svint32_t op1, svuint32_t op2) MODE_ATTR 76*207e5cccSFangrui Song { 77*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_s32,_z,)(pg, op1, op2); 78*207e5cccSFangrui Song } 79*207e5cccSFangrui Song 80*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_s64_z( 81*207e5cccSFangrui Song // CHECK-NEXT: entry: 82*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) 83*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> zeroinitializer 84*207e5cccSFangrui Song // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.asr.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[TMP1]], <vscale x 2 x i64> [[OP2:%.*]]) 85*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP2]] 86*207e5cccSFangrui Song // 87*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svasr_s64_zu10__SVBool_tu11__SVInt64_tu12__SVUint64_t( 88*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 89*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) 90*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> zeroinitializer 91*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.asr.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[TMP1]], <vscale x 2 x i64> [[OP2:%.*]]) 92*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP2]] 93*207e5cccSFangrui Song // 94*207e5cccSFangrui Song svint64_t test_svasr_s64_z(svbool_t pg, svint64_t op1, svuint64_t op2) MODE_ATTR 95*207e5cccSFangrui Song { 96*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_s64,_z,)(pg, op1, op2); 97*207e5cccSFangrui Song } 98*207e5cccSFangrui Song 99*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_s8_m( 100*207e5cccSFangrui Song // CHECK-NEXT: entry: 101*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]]) 102*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 103*207e5cccSFangrui Song // 104*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z15test_svasr_s8_mu10__SVBool_tu10__SVInt8_tu11__SVUint8_t( 105*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 106*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]]) 107*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 108*207e5cccSFangrui Song // 109*207e5cccSFangrui Song svint8_t test_svasr_s8_m(svbool_t pg, svint8_t op1, svuint8_t op2) MODE_ATTR 110*207e5cccSFangrui Song { 111*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_s8,_m,)(pg, op1, op2); 112*207e5cccSFangrui Song } 113*207e5cccSFangrui Song 114*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_s16_m( 115*207e5cccSFangrui Song // CHECK-NEXT: entry: 116*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 117*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]]) 118*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 119*207e5cccSFangrui Song // 120*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svasr_s16_mu10__SVBool_tu11__SVInt16_tu12__SVUint16_t( 121*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 122*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 123*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]]) 124*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 125*207e5cccSFangrui Song // 126*207e5cccSFangrui Song svint16_t test_svasr_s16_m(svbool_t pg, svint16_t op1, svuint16_t op2) MODE_ATTR 127*207e5cccSFangrui Song { 128*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_s16,_m,)(pg, op1, op2); 129*207e5cccSFangrui Song } 130*207e5cccSFangrui Song 131*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_s32_m( 132*207e5cccSFangrui Song // CHECK-NEXT: entry: 133*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 134*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]]) 135*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 136*207e5cccSFangrui Song // 137*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svasr_s32_mu10__SVBool_tu11__SVInt32_tu12__SVUint32_t( 138*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 139*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 140*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]]) 141*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 142*207e5cccSFangrui Song // 143*207e5cccSFangrui Song svint32_t test_svasr_s32_m(svbool_t pg, svint32_t op1, svuint32_t op2) MODE_ATTR 144*207e5cccSFangrui Song { 145*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_s32,_m,)(pg, op1, op2); 146*207e5cccSFangrui Song } 147*207e5cccSFangrui Song 148*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_s64_m( 149*207e5cccSFangrui Song // CHECK-NEXT: entry: 150*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) 151*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.asr.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 152*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP1]] 153*207e5cccSFangrui Song // 154*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svasr_s64_mu10__SVBool_tu11__SVInt64_tu12__SVUint64_t( 155*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 156*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) 157*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.asr.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 158*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP1]] 159*207e5cccSFangrui Song // 160*207e5cccSFangrui Song svint64_t test_svasr_s64_m(svbool_t pg, svint64_t op1, svuint64_t op2) MODE_ATTR 161*207e5cccSFangrui Song { 162*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_s64,_m,)(pg, op1, op2); 163*207e5cccSFangrui Song } 164*207e5cccSFangrui Song 165*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_s8_x( 166*207e5cccSFangrui Song // CHECK-NEXT: entry: 167*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.u.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]]) 168*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 169*207e5cccSFangrui Song // 170*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z15test_svasr_s8_xu10__SVBool_tu10__SVInt8_tu11__SVUint8_t( 171*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 172*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.u.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]]) 173*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 174*207e5cccSFangrui Song // 175*207e5cccSFangrui Song svint8_t test_svasr_s8_x(svbool_t pg, svint8_t op1, svuint8_t op2) MODE_ATTR 176*207e5cccSFangrui Song { 177*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_s8,_x,)(pg, op1, op2); 178*207e5cccSFangrui Song } 179*207e5cccSFangrui Song 180*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_s16_x( 181*207e5cccSFangrui Song // CHECK-NEXT: entry: 182*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 183*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.u.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]]) 184*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 185*207e5cccSFangrui Song // 186*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svasr_s16_xu10__SVBool_tu11__SVInt16_tu12__SVUint16_t( 187*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 188*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 189*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.u.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]]) 190*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 191*207e5cccSFangrui Song // 192*207e5cccSFangrui Song svint16_t test_svasr_s16_x(svbool_t pg, svint16_t op1, svuint16_t op2) MODE_ATTR 193*207e5cccSFangrui Song { 194*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_s16,_x,)(pg, op1, op2); 195*207e5cccSFangrui Song } 196*207e5cccSFangrui Song 197*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_s32_x( 198*207e5cccSFangrui Song // CHECK-NEXT: entry: 199*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 200*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.u.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]]) 201*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 202*207e5cccSFangrui Song // 203*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svasr_s32_xu10__SVBool_tu11__SVInt32_tu12__SVUint32_t( 204*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 205*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 206*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.u.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]]) 207*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 208*207e5cccSFangrui Song // 209*207e5cccSFangrui Song svint32_t test_svasr_s32_x(svbool_t pg, svint32_t op1, svuint32_t op2) MODE_ATTR 210*207e5cccSFangrui Song { 211*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_s32,_x,)(pg, op1, op2); 212*207e5cccSFangrui Song } 213*207e5cccSFangrui Song 214*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_s64_x( 215*207e5cccSFangrui Song // CHECK-NEXT: entry: 216*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) 217*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.asr.u.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 218*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP1]] 219*207e5cccSFangrui Song // 220*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svasr_s64_xu10__SVBool_tu11__SVInt64_tu12__SVUint64_t( 221*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 222*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) 223*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.asr.u.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 224*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP1]] 225*207e5cccSFangrui Song // 226*207e5cccSFangrui Song svint64_t test_svasr_s64_x(svbool_t pg, svint64_t op1, svuint64_t op2) MODE_ATTR 227*207e5cccSFangrui Song { 228*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_s64,_x,)(pg, op1, op2); 229*207e5cccSFangrui Song } 230*207e5cccSFangrui Song 231*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_n_s64_z( 232*207e5cccSFangrui Song // CHECK-NEXT: entry: 233*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) 234*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 235*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 236*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> zeroinitializer 237*207e5cccSFangrui Song // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.asr.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[TMP1]], <vscale x 2 x i64> [[DOTSPLAT]]) 238*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP2]] 239*207e5cccSFangrui Song // 240*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svasr_n_s64_zu10__SVBool_tu11__SVInt64_tm( 241*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 242*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) 243*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 244*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 245*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> zeroinitializer 246*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.asr.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[TMP1]], <vscale x 2 x i64> [[DOTSPLAT]]) 247*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP2]] 248*207e5cccSFangrui Song // 249*207e5cccSFangrui Song svint64_t test_svasr_n_s64_z(svbool_t pg, svint64_t op1, uint64_t op2) MODE_ATTR 250*207e5cccSFangrui Song { 251*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_n_s64,_z,)(pg, op1, op2); 252*207e5cccSFangrui Song } 253*207e5cccSFangrui Song 254*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_n_s64_m( 255*207e5cccSFangrui Song // CHECK-NEXT: entry: 256*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) 257*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 258*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 259*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.asr.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 260*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP1]] 261*207e5cccSFangrui Song // 262*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svasr_n_s64_mu10__SVBool_tu11__SVInt64_tm( 263*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 264*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) 265*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 266*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 267*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.asr.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 268*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP1]] 269*207e5cccSFangrui Song // 270*207e5cccSFangrui Song svint64_t test_svasr_n_s64_m(svbool_t pg, svint64_t op1, uint64_t op2) MODE_ATTR 271*207e5cccSFangrui Song { 272*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_n_s64,_m,)(pg, op1, op2); 273*207e5cccSFangrui Song } 274*207e5cccSFangrui Song 275*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_n_s64_x( 276*207e5cccSFangrui Song // CHECK-NEXT: entry: 277*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) 278*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 279*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 280*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.asr.u.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 281*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP1]] 282*207e5cccSFangrui Song // 283*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svasr_n_s64_xu10__SVBool_tu11__SVInt64_tm( 284*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 285*207e5cccSFangrui Song // CPP-CHECK-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 // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 287*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 288*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.asr.u.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 289*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP1]] 290*207e5cccSFangrui Song // 291*207e5cccSFangrui Song svint64_t test_svasr_n_s64_x(svbool_t pg, svint64_t op1, uint64_t op2) MODE_ATTR 292*207e5cccSFangrui Song { 293*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_n_s64,_x,)(pg, op1, op2); 294*207e5cccSFangrui Song } 295*207e5cccSFangrui Song 296*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_s8_z( 297*207e5cccSFangrui Song // CHECK-NEXT: entry: 298*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = select <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> zeroinitializer 299*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.wide.nxv16i8(<vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[TMP0]], <vscale x 2 x i64> [[OP2:%.*]]) 300*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP1]] 301*207e5cccSFangrui Song // 302*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z20test_svasr_wide_s8_zu10__SVBool_tu10__SVInt8_tu12__SVUint64_t( 303*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 304*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = select <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> zeroinitializer 305*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.wide.nxv16i8(<vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[TMP0]], <vscale x 2 x i64> [[OP2:%.*]]) 306*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP1]] 307*207e5cccSFangrui Song // 308*207e5cccSFangrui Song svint8_t test_svasr_wide_s8_z(svbool_t pg, svint8_t op1, svuint64_t op2) MODE_ATTR 309*207e5cccSFangrui Song { 310*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_s8,_z,)(pg, op1, op2); 311*207e5cccSFangrui Song } 312*207e5cccSFangrui Song 313*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_s16_z( 314*207e5cccSFangrui Song // CHECK-NEXT: entry: 315*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 316*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> zeroinitializer 317*207e5cccSFangrui Song // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.wide.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[TMP1]], <vscale x 2 x i64> [[OP2:%.*]]) 318*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP2]] 319*207e5cccSFangrui Song // 320*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z21test_svasr_wide_s16_zu10__SVBool_tu11__SVInt16_tu12__SVUint64_t( 321*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 322*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 323*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> zeroinitializer 324*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.wide.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[TMP1]], <vscale x 2 x i64> [[OP2:%.*]]) 325*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP2]] 326*207e5cccSFangrui Song // 327*207e5cccSFangrui Song svint16_t test_svasr_wide_s16_z(svbool_t pg, svint16_t op1, svuint64_t op2) MODE_ATTR 328*207e5cccSFangrui Song { 329*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_s16,_z,)(pg, op1, op2); 330*207e5cccSFangrui Song } 331*207e5cccSFangrui Song 332*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_s32_z( 333*207e5cccSFangrui Song // CHECK-NEXT: entry: 334*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 335*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> zeroinitializer 336*207e5cccSFangrui Song // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.wide.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[TMP1]], <vscale x 2 x i64> [[OP2:%.*]]) 337*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP2]] 338*207e5cccSFangrui Song // 339*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z21test_svasr_wide_s32_zu10__SVBool_tu11__SVInt32_tu12__SVUint64_t( 340*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 341*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 342*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> zeroinitializer 343*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.wide.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[TMP1]], <vscale x 2 x i64> [[OP2:%.*]]) 344*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP2]] 345*207e5cccSFangrui Song // 346*207e5cccSFangrui Song svint32_t test_svasr_wide_s32_z(svbool_t pg, svint32_t op1, svuint64_t op2) MODE_ATTR 347*207e5cccSFangrui Song { 348*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_s32,_z,)(pg, op1, op2); 349*207e5cccSFangrui Song } 350*207e5cccSFangrui Song 351*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_s8_m( 352*207e5cccSFangrui Song // CHECK-NEXT: entry: 353*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.wide.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 354*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 355*207e5cccSFangrui Song // 356*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z20test_svasr_wide_s8_mu10__SVBool_tu10__SVInt8_tu12__SVUint64_t( 357*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 358*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.wide.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 359*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 360*207e5cccSFangrui Song // 361*207e5cccSFangrui Song svint8_t test_svasr_wide_s8_m(svbool_t pg, svint8_t op1, svuint64_t op2) MODE_ATTR 362*207e5cccSFangrui Song { 363*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_s8,_m,)(pg, op1, op2); 364*207e5cccSFangrui Song } 365*207e5cccSFangrui Song 366*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_s16_m( 367*207e5cccSFangrui Song // CHECK-NEXT: entry: 368*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 369*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.wide.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 370*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 371*207e5cccSFangrui Song // 372*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z21test_svasr_wide_s16_mu10__SVBool_tu11__SVInt16_tu12__SVUint64_t( 373*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 374*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 375*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.wide.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 376*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 377*207e5cccSFangrui Song // 378*207e5cccSFangrui Song svint16_t test_svasr_wide_s16_m(svbool_t pg, svint16_t op1, svuint64_t op2) MODE_ATTR 379*207e5cccSFangrui Song { 380*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_s16,_m,)(pg, op1, op2); 381*207e5cccSFangrui Song } 382*207e5cccSFangrui Song 383*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_s32_m( 384*207e5cccSFangrui Song // CHECK-NEXT: entry: 385*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 386*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.wide.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 387*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 388*207e5cccSFangrui Song // 389*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z21test_svasr_wide_s32_mu10__SVBool_tu11__SVInt32_tu12__SVUint64_t( 390*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 391*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 392*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.wide.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 393*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 394*207e5cccSFangrui Song // 395*207e5cccSFangrui Song svint32_t test_svasr_wide_s32_m(svbool_t pg, svint32_t op1, svuint64_t op2) MODE_ATTR 396*207e5cccSFangrui Song { 397*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_s32,_m,)(pg, op1, op2); 398*207e5cccSFangrui Song } 399*207e5cccSFangrui Song 400*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_s8_x( 401*207e5cccSFangrui Song // CHECK-NEXT: entry: 402*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.wide.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 403*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 404*207e5cccSFangrui Song // 405*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z20test_svasr_wide_s8_xu10__SVBool_tu10__SVInt8_tu12__SVUint64_t( 406*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 407*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.wide.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 408*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 409*207e5cccSFangrui Song // 410*207e5cccSFangrui Song svint8_t test_svasr_wide_s8_x(svbool_t pg, svint8_t op1, svuint64_t op2) MODE_ATTR 411*207e5cccSFangrui Song { 412*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_s8,_x,)(pg, op1, op2); 413*207e5cccSFangrui Song } 414*207e5cccSFangrui Song 415*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_s16_x( 416*207e5cccSFangrui Song // CHECK-NEXT: entry: 417*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 418*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.wide.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 419*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 420*207e5cccSFangrui Song // 421*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z21test_svasr_wide_s16_xu10__SVBool_tu11__SVInt16_tu12__SVUint64_t( 422*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 423*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 424*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.wide.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 425*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 426*207e5cccSFangrui Song // 427*207e5cccSFangrui Song svint16_t test_svasr_wide_s16_x(svbool_t pg, svint16_t op1, svuint64_t op2) MODE_ATTR 428*207e5cccSFangrui Song { 429*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_s16,_x,)(pg, op1, op2); 430*207e5cccSFangrui Song } 431*207e5cccSFangrui Song 432*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_s32_x( 433*207e5cccSFangrui Song // CHECK-NEXT: entry: 434*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 435*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.wide.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 436*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 437*207e5cccSFangrui Song // 438*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z21test_svasr_wide_s32_xu10__SVBool_tu11__SVInt32_tu12__SVUint64_t( 439*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 440*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 441*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.wide.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]]) 442*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 443*207e5cccSFangrui Song // 444*207e5cccSFangrui Song svint32_t test_svasr_wide_s32_x(svbool_t pg, svint32_t op1, svuint64_t op2) MODE_ATTR 445*207e5cccSFangrui Song { 446*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_s32,_x,)(pg, op1, op2); 447*207e5cccSFangrui Song } 448*207e5cccSFangrui Song 449*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_n_s8_z( 450*207e5cccSFangrui Song // CHECK-NEXT: entry: 451*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP2:%.*]], i64 0 452*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer 453*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = select <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> zeroinitializer 454*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.nxv16i8(<vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[TMP0]], <vscale x 16 x i8> [[DOTSPLAT]]) 455*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP1]] 456*207e5cccSFangrui Song // 457*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svasr_n_s8_zu10__SVBool_tu10__SVInt8_th( 458*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 459*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP2:%.*]], i64 0 460*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer 461*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = select <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> zeroinitializer 462*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.nxv16i8(<vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[TMP0]], <vscale x 16 x i8> [[DOTSPLAT]]) 463*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP1]] 464*207e5cccSFangrui Song // 465*207e5cccSFangrui Song svint8_t test_svasr_n_s8_z(svbool_t pg, svint8_t op1, uint8_t op2) MODE_ATTR 466*207e5cccSFangrui Song { 467*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_n_s8,_z,)(pg, op1, op2); 468*207e5cccSFangrui Song } 469*207e5cccSFangrui Song 470*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_n_s16_z( 471*207e5cccSFangrui Song // CHECK-NEXT: entry: 472*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 473*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[OP2:%.*]], i64 0 474*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[DOTSPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer 475*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> zeroinitializer 476*207e5cccSFangrui Song // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[TMP1]], <vscale x 8 x i16> [[DOTSPLAT]]) 477*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP2]] 478*207e5cccSFangrui Song // 479*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svasr_n_s16_zu10__SVBool_tu11__SVInt16_tt( 480*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 481*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 482*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[OP2:%.*]], i64 0 483*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[DOTSPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer 484*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> zeroinitializer 485*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[TMP1]], <vscale x 8 x i16> [[DOTSPLAT]]) 486*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP2]] 487*207e5cccSFangrui Song // 488*207e5cccSFangrui Song svint16_t test_svasr_n_s16_z(svbool_t pg, svint16_t op1, uint16_t op2) MODE_ATTR 489*207e5cccSFangrui Song { 490*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_n_s16,_z,)(pg, op1, op2); 491*207e5cccSFangrui Song } 492*207e5cccSFangrui Song 493*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_n_s32_z( 494*207e5cccSFangrui Song // CHECK-NEXT: entry: 495*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 496*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP2:%.*]], i64 0 497*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer 498*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> zeroinitializer 499*207e5cccSFangrui Song // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[TMP1]], <vscale x 4 x i32> [[DOTSPLAT]]) 500*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP2]] 501*207e5cccSFangrui Song // 502*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svasr_n_s32_zu10__SVBool_tu11__SVInt32_tj( 503*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 504*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 505*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP2:%.*]], i64 0 506*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer 507*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> zeroinitializer 508*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[TMP1]], <vscale x 4 x i32> [[DOTSPLAT]]) 509*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP2]] 510*207e5cccSFangrui Song // 511*207e5cccSFangrui Song svint32_t test_svasr_n_s32_z(svbool_t pg, svint32_t op1, uint32_t op2) MODE_ATTR 512*207e5cccSFangrui Song { 513*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_n_s32,_z,)(pg, op1, op2); 514*207e5cccSFangrui Song } 515*207e5cccSFangrui Song 516*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_n_s8_m( 517*207e5cccSFangrui Song // CHECK-NEXT: entry: 518*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP2:%.*]], i64 0 519*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer 520*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[DOTSPLAT]]) 521*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 522*207e5cccSFangrui Song // 523*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svasr_n_s8_mu10__SVBool_tu10__SVInt8_th( 524*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 525*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP2:%.*]], i64 0 526*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer 527*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[DOTSPLAT]]) 528*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 529*207e5cccSFangrui Song // 530*207e5cccSFangrui Song svint8_t test_svasr_n_s8_m(svbool_t pg, svint8_t op1, uint8_t op2) MODE_ATTR 531*207e5cccSFangrui Song { 532*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_n_s8,_m,)(pg, op1, op2); 533*207e5cccSFangrui Song } 534*207e5cccSFangrui Song 535*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_n_s16_m( 536*207e5cccSFangrui Song // CHECK-NEXT: entry: 537*207e5cccSFangrui Song // CHECK-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-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[OP2:%.*]], i64 0 539*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[DOTSPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer 540*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> [[DOTSPLAT]]) 541*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 542*207e5cccSFangrui Song // 543*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svasr_n_s16_mu10__SVBool_tu11__SVInt16_tt( 544*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 545*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 546*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[OP2:%.*]], i64 0 547*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[DOTSPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer 548*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> [[DOTSPLAT]]) 549*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 550*207e5cccSFangrui Song // 551*207e5cccSFangrui Song svint16_t test_svasr_n_s16_m(svbool_t pg, svint16_t op1, uint16_t op2) MODE_ATTR 552*207e5cccSFangrui Song { 553*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_n_s16,_m,)(pg, op1, op2); 554*207e5cccSFangrui Song } 555*207e5cccSFangrui Song 556*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_n_s32_m( 557*207e5cccSFangrui Song // CHECK-NEXT: entry: 558*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 559*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP2:%.*]], i64 0 560*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer 561*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[DOTSPLAT]]) 562*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 563*207e5cccSFangrui Song // 564*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svasr_n_s32_mu10__SVBool_tu11__SVInt32_tj( 565*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 566*207e5cccSFangrui Song // CPP-CHECK-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 // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP2:%.*]], i64 0 568*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer 569*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[DOTSPLAT]]) 570*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 571*207e5cccSFangrui Song // 572*207e5cccSFangrui Song svint32_t test_svasr_n_s32_m(svbool_t pg, svint32_t op1, uint32_t op2) MODE_ATTR 573*207e5cccSFangrui Song { 574*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_n_s32,_m,)(pg, op1, op2); 575*207e5cccSFangrui Song } 576*207e5cccSFangrui Song 577*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_n_s8_x( 578*207e5cccSFangrui Song // CHECK-NEXT: entry: 579*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP2:%.*]], i64 0 580*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer 581*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.u.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[DOTSPLAT]]) 582*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 583*207e5cccSFangrui Song // 584*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svasr_n_s8_xu10__SVBool_tu10__SVInt8_th( 585*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 586*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP2:%.*]], i64 0 587*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer 588*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.u.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[DOTSPLAT]]) 589*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 590*207e5cccSFangrui Song // 591*207e5cccSFangrui Song svint8_t test_svasr_n_s8_x(svbool_t pg, svint8_t op1, uint8_t op2) MODE_ATTR 592*207e5cccSFangrui Song { 593*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_n_s8,_x,)(pg, op1, op2); 594*207e5cccSFangrui Song } 595*207e5cccSFangrui Song 596*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_n_s16_x( 597*207e5cccSFangrui Song // CHECK-NEXT: entry: 598*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 599*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[OP2:%.*]], i64 0 600*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[DOTSPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer 601*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.u.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> [[DOTSPLAT]]) 602*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 603*207e5cccSFangrui Song // 604*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svasr_n_s16_xu10__SVBool_tu11__SVInt16_tt( 605*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 606*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 607*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[OP2:%.*]], i64 0 608*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[DOTSPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer 609*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.u.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> [[DOTSPLAT]]) 610*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 611*207e5cccSFangrui Song // 612*207e5cccSFangrui Song svint16_t test_svasr_n_s16_x(svbool_t pg, svint16_t op1, uint16_t op2) MODE_ATTR 613*207e5cccSFangrui Song { 614*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_n_s16,_x,)(pg, op1, op2); 615*207e5cccSFangrui Song } 616*207e5cccSFangrui Song 617*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_n_s32_x( 618*207e5cccSFangrui Song // CHECK-NEXT: entry: 619*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 620*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP2:%.*]], i64 0 621*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer 622*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.u.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[DOTSPLAT]]) 623*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 624*207e5cccSFangrui Song // 625*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svasr_n_s32_xu10__SVBool_tu11__SVInt32_tj( 626*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 627*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 628*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP2:%.*]], i64 0 629*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer 630*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.u.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[DOTSPLAT]]) 631*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 632*207e5cccSFangrui Song // 633*207e5cccSFangrui Song svint32_t test_svasr_n_s32_x(svbool_t pg, svint32_t op1, uint32_t op2) MODE_ATTR 634*207e5cccSFangrui Song { 635*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr,_n_s32,_x,)(pg, op1, op2); 636*207e5cccSFangrui Song } 637*207e5cccSFangrui Song 638*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_n_s8_m( 639*207e5cccSFangrui Song // CHECK-NEXT: entry: 640*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 641*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 642*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.wide.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 643*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 644*207e5cccSFangrui Song // 645*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z22test_svasr_wide_n_s8_mu10__SVBool_tu10__SVInt8_tm( 646*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 647*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 648*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 649*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.wide.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 650*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 651*207e5cccSFangrui Song // 652*207e5cccSFangrui Song svint8_t test_svasr_wide_n_s8_m(svbool_t pg, svint8_t op1, uint64_t op2) MODE_ATTR 653*207e5cccSFangrui Song { 654*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_n_s8,_m,)(pg, op1, op2); 655*207e5cccSFangrui Song } 656*207e5cccSFangrui Song 657*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_n_s16_m( 658*207e5cccSFangrui Song // CHECK-NEXT: entry: 659*207e5cccSFangrui Song // CHECK-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-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 661*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 662*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.wide.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 663*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 664*207e5cccSFangrui Song // 665*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z23test_svasr_wide_n_s16_mu10__SVBool_tu11__SVInt16_tm( 666*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 667*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 668*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 669*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 670*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.wide.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 671*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 672*207e5cccSFangrui Song // 673*207e5cccSFangrui Song svint16_t test_svasr_wide_n_s16_m(svbool_t pg, svint16_t op1, uint64_t op2) MODE_ATTR 674*207e5cccSFangrui Song { 675*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_n_s16,_m,)(pg, op1, op2); 676*207e5cccSFangrui Song } 677*207e5cccSFangrui Song 678*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_n_s32_m( 679*207e5cccSFangrui Song // CHECK-NEXT: entry: 680*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 681*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 682*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 683*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.wide.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 684*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 685*207e5cccSFangrui Song // 686*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z23test_svasr_wide_n_s32_mu10__SVBool_tu11__SVInt32_tm( 687*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 688*207e5cccSFangrui Song // CPP-CHECK-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 // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 690*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 691*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.wide.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 692*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 693*207e5cccSFangrui Song // 694*207e5cccSFangrui Song svint32_t test_svasr_wide_n_s32_m(svbool_t pg, svint32_t op1, uint64_t op2) MODE_ATTR 695*207e5cccSFangrui Song { 696*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_n_s32,_m,)(pg, op1, op2); 697*207e5cccSFangrui Song } 698*207e5cccSFangrui Song 699*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_n_s8_z( 700*207e5cccSFangrui Song // CHECK-NEXT: entry: 701*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 702*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 703*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = select <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> zeroinitializer 704*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.wide.nxv16i8(<vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[TMP0]], <vscale x 2 x i64> [[DOTSPLAT]]) 705*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP1]] 706*207e5cccSFangrui Song // 707*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z22test_svasr_wide_n_s8_zu10__SVBool_tu10__SVInt8_tm( 708*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 709*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 710*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 711*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = select <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> zeroinitializer 712*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.wide.nxv16i8(<vscale x 16 x i1> [[PG]], <vscale x 16 x i8> [[TMP0]], <vscale x 2 x i64> [[DOTSPLAT]]) 713*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP1]] 714*207e5cccSFangrui Song // 715*207e5cccSFangrui Song svint8_t test_svasr_wide_n_s8_z(svbool_t pg, svint8_t op1, uint64_t op2) MODE_ATTR 716*207e5cccSFangrui Song { 717*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_n_s8,_z,)(pg, op1, op2); 718*207e5cccSFangrui Song } 719*207e5cccSFangrui Song 720*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_n_s16_z( 721*207e5cccSFangrui Song // CHECK-NEXT: entry: 722*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 723*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 724*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 725*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> zeroinitializer 726*207e5cccSFangrui Song // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.wide.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[TMP1]], <vscale x 2 x i64> [[DOTSPLAT]]) 727*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP2]] 728*207e5cccSFangrui Song // 729*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z23test_svasr_wide_n_s16_zu10__SVBool_tu11__SVInt16_tm( 730*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 731*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 732*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 733*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 734*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 8 x i16> zeroinitializer 735*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.wide.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[TMP1]], <vscale x 2 x i64> [[DOTSPLAT]]) 736*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP2]] 737*207e5cccSFangrui Song // 738*207e5cccSFangrui Song svint16_t test_svasr_wide_n_s16_z(svbool_t pg, svint16_t op1, uint64_t op2) MODE_ATTR 739*207e5cccSFangrui Song { 740*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_n_s16,_z,)(pg, op1, op2); 741*207e5cccSFangrui Song } 742*207e5cccSFangrui Song 743*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_n_s32_z( 744*207e5cccSFangrui Song // CHECK-NEXT: entry: 745*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 746*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 747*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 748*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> zeroinitializer 749*207e5cccSFangrui Song // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.wide.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[TMP1]], <vscale x 2 x i64> [[DOTSPLAT]]) 750*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP2]] 751*207e5cccSFangrui Song // 752*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z23test_svasr_wide_n_s32_zu10__SVBool_tu11__SVInt32_tm( 753*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 754*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 755*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 756*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 757*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> zeroinitializer 758*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.wide.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[TMP1]], <vscale x 2 x i64> [[DOTSPLAT]]) 759*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP2]] 760*207e5cccSFangrui Song // 761*207e5cccSFangrui Song svint32_t test_svasr_wide_n_s32_z(svbool_t pg, svint32_t op1, uint64_t op2) MODE_ATTR 762*207e5cccSFangrui Song { 763*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_n_s32,_z,)(pg, op1, op2); 764*207e5cccSFangrui Song } 765*207e5cccSFangrui Song 766*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_n_s8_x( 767*207e5cccSFangrui Song // CHECK-NEXT: entry: 768*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 769*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 770*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.wide.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 771*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 772*207e5cccSFangrui Song // 773*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z22test_svasr_wide_n_s8_xu10__SVBool_tu10__SVInt8_tm( 774*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 775*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 776*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 777*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asr.wide.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 778*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] 779*207e5cccSFangrui Song // 780*207e5cccSFangrui Song svint8_t test_svasr_wide_n_s8_x(svbool_t pg, svint8_t op1, uint64_t op2) MODE_ATTR 781*207e5cccSFangrui Song { 782*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_n_s8,_x,)(pg, op1, op2); 783*207e5cccSFangrui Song } 784*207e5cccSFangrui Song 785*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_n_s16_x( 786*207e5cccSFangrui Song // CHECK-NEXT: entry: 787*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 788*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 789*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 790*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.wide.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 791*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 792*207e5cccSFangrui Song // 793*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z23test_svasr_wide_n_s16_xu10__SVBool_tu11__SVInt16_tm( 794*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 795*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) 796*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 797*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 798*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.asr.wide.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 799*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]] 800*207e5cccSFangrui Song // 801*207e5cccSFangrui Song svint16_t test_svasr_wide_n_s16_x(svbool_t pg, svint16_t op1, uint64_t op2) MODE_ATTR 802*207e5cccSFangrui Song { 803*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_n_s16,_x,)(pg, op1, op2); 804*207e5cccSFangrui Song } 805*207e5cccSFangrui Song 806*207e5cccSFangrui Song // CHECK-LABEL: @test_svasr_wide_n_s32_x( 807*207e5cccSFangrui Song // CHECK-NEXT: entry: 808*207e5cccSFangrui Song // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 809*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 810*207e5cccSFangrui Song // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 811*207e5cccSFangrui Song // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.wide.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 812*207e5cccSFangrui Song // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 813*207e5cccSFangrui Song // 814*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z23test_svasr_wide_n_s32_xu10__SVBool_tu11__SVInt32_tm( 815*207e5cccSFangrui Song // CPP-CHECK-NEXT: entry: 816*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) 817*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[OP2:%.*]], i64 0 818*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer 819*207e5cccSFangrui Song // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.asr.wide.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP1:%.*]], <vscale x 2 x i64> [[DOTSPLAT]]) 820*207e5cccSFangrui Song // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]] 821*207e5cccSFangrui Song // 822*207e5cccSFangrui Song svint32_t test_svasr_wide_n_s32_x(svbool_t pg, svint32_t op1, uint64_t op2) MODE_ATTR 823*207e5cccSFangrui Song { 824*207e5cccSFangrui Song return SVE_ACLE_FUNC(svasr_wide,_n_s32,_x,)(pg, op1, op2); 825*207e5cccSFangrui Song } 826