xref: /llvm-project/clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_extb.c (revision 207e5ccceec8d3cc3f32723e78f2a142bc61b07d)
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 -fclang-abi-compat=latest -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 -fclang-abi-compat=latest -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 -fclang-abi-compat=latest -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 -fclang-abi-compat=latest -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 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
8*207e5cccSFangrui Song // RUN: %clang_cc1 -fclang-abi-compat=latest -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_svextb_s16_z(
26*207e5cccSFangrui Song // CHECK-NEXT:  entry:
27*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:%.*]])
28*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.sxtb.nxv8i16(<vscale x 8 x i16> zeroinitializer, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
29*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
30*207e5cccSFangrui Song //
31*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_s16_zu10__SVBool_tu11__SVInt16_t(
32*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
33*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:%.*]])
34*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.sxtb.nxv8i16(<vscale x 8 x i16> zeroinitializer, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
35*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
36*207e5cccSFangrui Song //
37*207e5cccSFangrui Song svint16_t test_svextb_s16_z(svbool_t pg, svint16_t op) MODE_ATTR
38*207e5cccSFangrui Song {
39*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_s16,_z,)(pg, op);
40*207e5cccSFangrui Song }
41*207e5cccSFangrui Song 
42*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_s32_z(
43*207e5cccSFangrui Song // CHECK-NEXT:  entry:
44*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:%.*]])
45*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.sxtb.nxv4i32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
46*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
47*207e5cccSFangrui Song //
48*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_s32_zu10__SVBool_tu11__SVInt32_t(
49*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
50*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:%.*]])
51*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.sxtb.nxv4i32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
52*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
53*207e5cccSFangrui Song //
54*207e5cccSFangrui Song svint32_t test_svextb_s32_z(svbool_t pg, svint32_t op) MODE_ATTR
55*207e5cccSFangrui Song {
56*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_s32,_z,)(pg, op);
57*207e5cccSFangrui Song }
58*207e5cccSFangrui Song 
59*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_s64_z(
60*207e5cccSFangrui Song // CHECK-NEXT:  entry:
61*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:%.*]])
62*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.sxtb.nxv2i64(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
63*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
64*207e5cccSFangrui Song //
65*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_s64_zu10__SVBool_tu11__SVInt64_t(
66*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
67*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:%.*]])
68*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.sxtb.nxv2i64(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
69*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
70*207e5cccSFangrui Song //
71*207e5cccSFangrui Song svint64_t test_svextb_s64_z(svbool_t pg, svint64_t op) MODE_ATTR
72*207e5cccSFangrui Song {
73*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_s64,_z,)(pg, op);
74*207e5cccSFangrui Song }
75*207e5cccSFangrui Song 
76*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_u16_z(
77*207e5cccSFangrui Song // CHECK-NEXT:  entry:
78*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:%.*]])
79*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.uxtb.nxv8i16(<vscale x 8 x i16> zeroinitializer, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
80*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
81*207e5cccSFangrui Song //
82*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_u16_zu10__SVBool_tu12__SVUint16_t(
83*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
84*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:%.*]])
85*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.uxtb.nxv8i16(<vscale x 8 x i16> zeroinitializer, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
86*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
87*207e5cccSFangrui Song //
88*207e5cccSFangrui Song svuint16_t test_svextb_u16_z(svbool_t pg, svuint16_t op) MODE_ATTR
89*207e5cccSFangrui Song {
90*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_u16,_z,)(pg, op);
91*207e5cccSFangrui Song }
92*207e5cccSFangrui Song 
93*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_u32_z(
94*207e5cccSFangrui Song // CHECK-NEXT:  entry:
95*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:%.*]])
96*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.uxtb.nxv4i32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
97*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
98*207e5cccSFangrui Song //
99*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_u32_zu10__SVBool_tu12__SVUint32_t(
100*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
101*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:%.*]])
102*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.uxtb.nxv4i32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
103*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
104*207e5cccSFangrui Song //
105*207e5cccSFangrui Song svuint32_t test_svextb_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR
106*207e5cccSFangrui Song {
107*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_u32,_z,)(pg, op);
108*207e5cccSFangrui Song }
109*207e5cccSFangrui Song 
110*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_u64_z(
111*207e5cccSFangrui Song // CHECK-NEXT:  entry:
112*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:%.*]])
113*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.uxtb.nxv2i64(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
114*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
115*207e5cccSFangrui Song //
116*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_u64_zu10__SVBool_tu12__SVUint64_t(
117*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
118*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:%.*]])
119*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.uxtb.nxv2i64(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
120*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
121*207e5cccSFangrui Song //
122*207e5cccSFangrui Song svuint64_t test_svextb_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR
123*207e5cccSFangrui Song {
124*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_u64,_z,)(pg, op);
125*207e5cccSFangrui Song }
126*207e5cccSFangrui Song 
127*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_s16_m(
128*207e5cccSFangrui Song // CHECK-NEXT:  entry:
129*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:%.*]])
130*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.sxtb.nxv8i16(<vscale x 8 x i16> [[INACTIVE:%.*]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
131*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
132*207e5cccSFangrui Song //
133*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_s16_mu11__SVInt16_tu10__SVBool_tS_(
134*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
135*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:%.*]])
136*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.sxtb.nxv8i16(<vscale x 8 x i16> [[INACTIVE:%.*]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
137*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
138*207e5cccSFangrui Song //
139*207e5cccSFangrui Song svint16_t test_svextb_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) MODE_ATTR
140*207e5cccSFangrui Song {
141*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_s16,_m,)(inactive, pg, op);
142*207e5cccSFangrui Song }
143*207e5cccSFangrui Song 
144*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_s32_m(
145*207e5cccSFangrui Song // CHECK-NEXT:  entry:
146*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:%.*]])
147*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.sxtb.nxv4i32(<vscale x 4 x i32> [[INACTIVE:%.*]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
148*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
149*207e5cccSFangrui Song //
150*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_s32_mu11__SVInt32_tu10__SVBool_tS_(
151*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
152*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:%.*]])
153*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.sxtb.nxv4i32(<vscale x 4 x i32> [[INACTIVE:%.*]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
154*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
155*207e5cccSFangrui Song //
156*207e5cccSFangrui Song svint32_t test_svextb_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR
157*207e5cccSFangrui Song {
158*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_s32,_m,)(inactive, pg, op);
159*207e5cccSFangrui Song }
160*207e5cccSFangrui Song 
161*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_s64_m(
162*207e5cccSFangrui Song // CHECK-NEXT:  entry:
163*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:%.*]])
164*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.sxtb.nxv2i64(<vscale x 2 x i64> [[INACTIVE:%.*]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
165*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
166*207e5cccSFangrui Song //
167*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_s64_mu11__SVInt64_tu10__SVBool_tS_(
168*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
169*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:%.*]])
170*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.sxtb.nxv2i64(<vscale x 2 x i64> [[INACTIVE:%.*]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
171*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
172*207e5cccSFangrui Song //
173*207e5cccSFangrui Song svint64_t test_svextb_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR
174*207e5cccSFangrui Song {
175*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_s64,_m,)(inactive, pg, op);
176*207e5cccSFangrui Song }
177*207e5cccSFangrui Song 
178*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_u16_m(
179*207e5cccSFangrui Song // CHECK-NEXT:  entry:
180*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:%.*]])
181*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.uxtb.nxv8i16(<vscale x 8 x i16> [[INACTIVE:%.*]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
182*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
183*207e5cccSFangrui Song //
184*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_u16_mu12__SVUint16_tu10__SVBool_tS_(
185*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
186*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:%.*]])
187*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.uxtb.nxv8i16(<vscale x 8 x i16> [[INACTIVE:%.*]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
188*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
189*207e5cccSFangrui Song //
190*207e5cccSFangrui Song svuint16_t test_svextb_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) MODE_ATTR
191*207e5cccSFangrui Song {
192*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_u16,_m,)(inactive, pg, op);
193*207e5cccSFangrui Song }
194*207e5cccSFangrui Song 
195*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_u32_m(
196*207e5cccSFangrui Song // CHECK-NEXT:  entry:
197*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:%.*]])
198*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.uxtb.nxv4i32(<vscale x 4 x i32> [[INACTIVE:%.*]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
199*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
200*207e5cccSFangrui Song //
201*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_u32_mu12__SVUint32_tu10__SVBool_tS_(
202*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
203*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:%.*]])
204*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.uxtb.nxv4i32(<vscale x 4 x i32> [[INACTIVE:%.*]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
205*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
206*207e5cccSFangrui Song //
207*207e5cccSFangrui Song svuint32_t test_svextb_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR
208*207e5cccSFangrui Song {
209*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_u32,_m,)(inactive, pg, op);
210*207e5cccSFangrui Song }
211*207e5cccSFangrui Song 
212*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_u64_m(
213*207e5cccSFangrui Song // CHECK-NEXT:  entry:
214*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:%.*]])
215*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.uxtb.nxv2i64(<vscale x 2 x i64> [[INACTIVE:%.*]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
216*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
217*207e5cccSFangrui Song //
218*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_u64_mu12__SVUint64_tu10__SVBool_tS_(
219*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
220*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:%.*]])
221*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.uxtb.nxv2i64(<vscale x 2 x i64> [[INACTIVE:%.*]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
222*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
223*207e5cccSFangrui Song //
224*207e5cccSFangrui Song svuint64_t test_svextb_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR
225*207e5cccSFangrui Song {
226*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_u64,_m,)(inactive, pg, op);
227*207e5cccSFangrui Song }
228*207e5cccSFangrui Song 
229*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_s16_x(
230*207e5cccSFangrui Song // CHECK-NEXT:  entry:
231*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:%.*]])
232*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.sxtb.nxv8i16(<vscale x 8 x i16> undef, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
233*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
234*207e5cccSFangrui Song //
235*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_s16_xu10__SVBool_tu11__SVInt16_t(
236*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
237*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:%.*]])
238*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.sxtb.nxv8i16(<vscale x 8 x i16> undef, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
239*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
240*207e5cccSFangrui Song //
241*207e5cccSFangrui Song svint16_t test_svextb_s16_x(svbool_t pg, svint16_t op) MODE_ATTR
242*207e5cccSFangrui Song {
243*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_s16,_x,)(pg, op);
244*207e5cccSFangrui Song }
245*207e5cccSFangrui Song 
246*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_s32_x(
247*207e5cccSFangrui Song // CHECK-NEXT:  entry:
248*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:%.*]])
249*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.sxtb.nxv4i32(<vscale x 4 x i32> undef, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
250*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
251*207e5cccSFangrui Song //
252*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_s32_xu10__SVBool_tu11__SVInt32_t(
253*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
254*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:%.*]])
255*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.sxtb.nxv4i32(<vscale x 4 x i32> undef, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
256*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
257*207e5cccSFangrui Song //
258*207e5cccSFangrui Song svint32_t test_svextb_s32_x(svbool_t pg, svint32_t op) MODE_ATTR
259*207e5cccSFangrui Song {
260*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_s32,_x,)(pg, op);
261*207e5cccSFangrui Song }
262*207e5cccSFangrui Song 
263*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_s64_x(
264*207e5cccSFangrui Song // CHECK-NEXT:  entry:
265*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:%.*]])
266*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.sxtb.nxv2i64(<vscale x 2 x i64> undef, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
267*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
268*207e5cccSFangrui Song //
269*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_s64_xu10__SVBool_tu11__SVInt64_t(
270*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
271*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:%.*]])
272*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.sxtb.nxv2i64(<vscale x 2 x i64> undef, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
273*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
274*207e5cccSFangrui Song //
275*207e5cccSFangrui Song svint64_t test_svextb_s64_x(svbool_t pg, svint64_t op) MODE_ATTR
276*207e5cccSFangrui Song {
277*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_s64,_x,)(pg, op);
278*207e5cccSFangrui Song }
279*207e5cccSFangrui Song 
280*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_u16_x(
281*207e5cccSFangrui Song // CHECK-NEXT:  entry:
282*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:%.*]])
283*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.uxtb.nxv8i16(<vscale x 8 x i16> undef, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
284*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
285*207e5cccSFangrui Song //
286*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_u16_xu10__SVBool_tu12__SVUint16_t(
287*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
288*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:%.*]])
289*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.uxtb.nxv8i16(<vscale x 8 x i16> undef, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
290*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
291*207e5cccSFangrui Song //
292*207e5cccSFangrui Song svuint16_t test_svextb_u16_x(svbool_t pg, svuint16_t op) MODE_ATTR
293*207e5cccSFangrui Song {
294*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_u16,_x,)(pg, op);
295*207e5cccSFangrui Song }
296*207e5cccSFangrui Song 
297*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_u32_x(
298*207e5cccSFangrui Song // CHECK-NEXT:  entry:
299*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:%.*]])
300*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.uxtb.nxv4i32(<vscale x 4 x i32> undef, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
301*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
302*207e5cccSFangrui Song //
303*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_u32_xu10__SVBool_tu12__SVUint32_t(
304*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
305*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:%.*]])
306*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.uxtb.nxv4i32(<vscale x 4 x i32> undef, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
307*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
308*207e5cccSFangrui Song //
309*207e5cccSFangrui Song svuint32_t test_svextb_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR
310*207e5cccSFangrui Song {
311*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_u32,_x,)(pg, op);
312*207e5cccSFangrui Song }
313*207e5cccSFangrui Song 
314*207e5cccSFangrui Song // CHECK-LABEL: @test_svextb_u64_x(
315*207e5cccSFangrui Song // CHECK-NEXT:  entry:
316*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:%.*]])
317*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.uxtb.nxv2i64(<vscale x 2 x i64> undef, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
318*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
319*207e5cccSFangrui Song //
320*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svextb_u64_xu10__SVBool_tu12__SVUint64_t(
321*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
322*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:%.*]])
323*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.uxtb.nxv2i64(<vscale x 2 x i64> undef, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
324*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
325*207e5cccSFangrui Song //
326*207e5cccSFangrui Song svuint64_t test_svextb_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR
327*207e5cccSFangrui Song {
328*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svextb,_u64,_x,)(pg, op);
329*207e5cccSFangrui Song }
330