xref: /llvm-project/clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_rbit.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_svrbit_s8_z(
26*207e5cccSFangrui Song // CHECK-NEXT:  entry:
27*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.rbit.nxv16i8(<vscale x 16 x i8> zeroinitializer, <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]])
28*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
29*207e5cccSFangrui Song //
30*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svrbit_s8_zu10__SVBool_tu10__SVInt8_t(
31*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
32*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.rbit.nxv16i8(<vscale x 16 x i8> zeroinitializer, <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]])
33*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
34*207e5cccSFangrui Song //
35*207e5cccSFangrui Song svint8_t test_svrbit_s8_z(svbool_t pg, svint8_t op) MODE_ATTR
36*207e5cccSFangrui Song {
37*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_s8,_z,)(pg, op);
38*207e5cccSFangrui Song }
39*207e5cccSFangrui Song 
40*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_s16_z(
41*207e5cccSFangrui Song // CHECK-NEXT:  entry:
42*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:%.*]])
43*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.rbit.nxv8i16(<vscale x 8 x i16> zeroinitializer, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
44*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
45*207e5cccSFangrui Song //
46*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_s16_zu10__SVBool_tu11__SVInt16_t(
47*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
48*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:%.*]])
49*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.rbit.nxv8i16(<vscale x 8 x i16> zeroinitializer, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
50*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
51*207e5cccSFangrui Song //
52*207e5cccSFangrui Song svint16_t test_svrbit_s16_z(svbool_t pg, svint16_t op) MODE_ATTR
53*207e5cccSFangrui Song {
54*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_s16,_z,)(pg, op);
55*207e5cccSFangrui Song }
56*207e5cccSFangrui Song 
57*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_s32_z(
58*207e5cccSFangrui Song // CHECK-NEXT:  entry:
59*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:%.*]])
60*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.rbit.nxv4i32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
61*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
62*207e5cccSFangrui Song //
63*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_s32_zu10__SVBool_tu11__SVInt32_t(
64*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
65*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:%.*]])
66*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.rbit.nxv4i32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
67*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
68*207e5cccSFangrui Song //
69*207e5cccSFangrui Song svint32_t test_svrbit_s32_z(svbool_t pg, svint32_t op) MODE_ATTR
70*207e5cccSFangrui Song {
71*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_s32,_z,)(pg, op);
72*207e5cccSFangrui Song }
73*207e5cccSFangrui Song 
74*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_s64_z(
75*207e5cccSFangrui Song // CHECK-NEXT:  entry:
76*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:%.*]])
77*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rbit.nxv2i64(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
78*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
79*207e5cccSFangrui Song //
80*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_s64_zu10__SVBool_tu11__SVInt64_t(
81*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
82*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:%.*]])
83*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rbit.nxv2i64(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
84*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
85*207e5cccSFangrui Song //
86*207e5cccSFangrui Song svint64_t test_svrbit_s64_z(svbool_t pg, svint64_t op) MODE_ATTR
87*207e5cccSFangrui Song {
88*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_s64,_z,)(pg, op);
89*207e5cccSFangrui Song }
90*207e5cccSFangrui Song 
91*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_u8_z(
92*207e5cccSFangrui Song // CHECK-NEXT:  entry:
93*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.rbit.nxv16i8(<vscale x 16 x i8> zeroinitializer, <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]])
94*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
95*207e5cccSFangrui Song //
96*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svrbit_u8_zu10__SVBool_tu11__SVUint8_t(
97*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
98*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.rbit.nxv16i8(<vscale x 16 x i8> zeroinitializer, <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]])
99*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
100*207e5cccSFangrui Song //
101*207e5cccSFangrui Song svuint8_t test_svrbit_u8_z(svbool_t pg, svuint8_t op) MODE_ATTR
102*207e5cccSFangrui Song {
103*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_u8,_z,)(pg, op);
104*207e5cccSFangrui Song }
105*207e5cccSFangrui Song 
106*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_u16_z(
107*207e5cccSFangrui Song // CHECK-NEXT:  entry:
108*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:%.*]])
109*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.rbit.nxv8i16(<vscale x 8 x i16> zeroinitializer, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
110*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
111*207e5cccSFangrui Song //
112*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_u16_zu10__SVBool_tu12__SVUint16_t(
113*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
114*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:%.*]])
115*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.rbit.nxv8i16(<vscale x 8 x i16> zeroinitializer, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
116*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
117*207e5cccSFangrui Song //
118*207e5cccSFangrui Song svuint16_t test_svrbit_u16_z(svbool_t pg, svuint16_t op) MODE_ATTR
119*207e5cccSFangrui Song {
120*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_u16,_z,)(pg, op);
121*207e5cccSFangrui Song }
122*207e5cccSFangrui Song 
123*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_u32_z(
124*207e5cccSFangrui Song // CHECK-NEXT:  entry:
125*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:%.*]])
126*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.rbit.nxv4i32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
127*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
128*207e5cccSFangrui Song //
129*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_u32_zu10__SVBool_tu12__SVUint32_t(
130*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
131*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:%.*]])
132*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.rbit.nxv4i32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
133*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
134*207e5cccSFangrui Song //
135*207e5cccSFangrui Song svuint32_t test_svrbit_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR
136*207e5cccSFangrui Song {
137*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_u32,_z,)(pg, op);
138*207e5cccSFangrui Song }
139*207e5cccSFangrui Song 
140*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_u64_z(
141*207e5cccSFangrui Song // CHECK-NEXT:  entry:
142*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:%.*]])
143*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rbit.nxv2i64(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
144*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
145*207e5cccSFangrui Song //
146*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_u64_zu10__SVBool_tu12__SVUint64_t(
147*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
148*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:%.*]])
149*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rbit.nxv2i64(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
150*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
151*207e5cccSFangrui Song //
152*207e5cccSFangrui Song svuint64_t test_svrbit_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR
153*207e5cccSFangrui Song {
154*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_u64,_z,)(pg, op);
155*207e5cccSFangrui Song }
156*207e5cccSFangrui Song 
157*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_s8_m(
158*207e5cccSFangrui Song // CHECK-NEXT:  entry:
159*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.rbit.nxv16i8(<vscale x 16 x i8> [[INACTIVE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]])
160*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
161*207e5cccSFangrui Song //
162*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svrbit_s8_mu10__SVInt8_tu10__SVBool_tS_(
163*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
164*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.rbit.nxv16i8(<vscale x 16 x i8> [[INACTIVE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]])
165*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
166*207e5cccSFangrui Song //
167*207e5cccSFangrui Song svint8_t test_svrbit_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) MODE_ATTR
168*207e5cccSFangrui Song {
169*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_s8,_m,)(inactive, pg, op);
170*207e5cccSFangrui Song }
171*207e5cccSFangrui Song 
172*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_s16_m(
173*207e5cccSFangrui Song // CHECK-NEXT:  entry:
174*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:%.*]])
175*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.rbit.nxv8i16(<vscale x 8 x i16> [[INACTIVE:%.*]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
176*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
177*207e5cccSFangrui Song //
178*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_s16_mu11__SVInt16_tu10__SVBool_tS_(
179*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
180*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:%.*]])
181*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.rbit.nxv8i16(<vscale x 8 x i16> [[INACTIVE:%.*]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
182*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
183*207e5cccSFangrui Song //
184*207e5cccSFangrui Song svint16_t test_svrbit_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) MODE_ATTR
185*207e5cccSFangrui Song {
186*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_s16,_m,)(inactive, pg, op);
187*207e5cccSFangrui Song }
188*207e5cccSFangrui Song 
189*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_s32_m(
190*207e5cccSFangrui Song // CHECK-NEXT:  entry:
191*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:%.*]])
192*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.rbit.nxv4i32(<vscale x 4 x i32> [[INACTIVE:%.*]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
193*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
194*207e5cccSFangrui Song //
195*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_s32_mu11__SVInt32_tu10__SVBool_tS_(
196*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
197*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:%.*]])
198*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.rbit.nxv4i32(<vscale x 4 x i32> [[INACTIVE:%.*]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
199*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
200*207e5cccSFangrui Song //
201*207e5cccSFangrui Song svint32_t test_svrbit_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR
202*207e5cccSFangrui Song {
203*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_s32,_m,)(inactive, pg, op);
204*207e5cccSFangrui Song }
205*207e5cccSFangrui Song 
206*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_s64_m(
207*207e5cccSFangrui Song // CHECK-NEXT:  entry:
208*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:%.*]])
209*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rbit.nxv2i64(<vscale x 2 x i64> [[INACTIVE:%.*]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
210*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
211*207e5cccSFangrui Song //
212*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_s64_mu11__SVInt64_tu10__SVBool_tS_(
213*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
214*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:%.*]])
215*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rbit.nxv2i64(<vscale x 2 x i64> [[INACTIVE:%.*]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
216*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
217*207e5cccSFangrui Song //
218*207e5cccSFangrui Song svint64_t test_svrbit_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR
219*207e5cccSFangrui Song {
220*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_s64,_m,)(inactive, pg, op);
221*207e5cccSFangrui Song }
222*207e5cccSFangrui Song 
223*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_u8_m(
224*207e5cccSFangrui Song // CHECK-NEXT:  entry:
225*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.rbit.nxv16i8(<vscale x 16 x i8> [[INACTIVE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]])
226*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
227*207e5cccSFangrui Song //
228*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svrbit_u8_mu11__SVUint8_tu10__SVBool_tS_(
229*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
230*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.rbit.nxv16i8(<vscale x 16 x i8> [[INACTIVE:%.*]], <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]])
231*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
232*207e5cccSFangrui Song //
233*207e5cccSFangrui Song svuint8_t test_svrbit_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) MODE_ATTR
234*207e5cccSFangrui Song {
235*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_u8,_m,)(inactive, pg, op);
236*207e5cccSFangrui Song }
237*207e5cccSFangrui Song 
238*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_u16_m(
239*207e5cccSFangrui Song // CHECK-NEXT:  entry:
240*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:%.*]])
241*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.rbit.nxv8i16(<vscale x 8 x i16> [[INACTIVE:%.*]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
242*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
243*207e5cccSFangrui Song //
244*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_u16_mu12__SVUint16_tu10__SVBool_tS_(
245*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
246*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:%.*]])
247*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.rbit.nxv8i16(<vscale x 8 x i16> [[INACTIVE:%.*]], <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
248*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
249*207e5cccSFangrui Song //
250*207e5cccSFangrui Song svuint16_t test_svrbit_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) MODE_ATTR
251*207e5cccSFangrui Song {
252*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_u16,_m,)(inactive, pg, op);
253*207e5cccSFangrui Song }
254*207e5cccSFangrui Song 
255*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_u32_m(
256*207e5cccSFangrui Song // CHECK-NEXT:  entry:
257*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:%.*]])
258*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.rbit.nxv4i32(<vscale x 4 x i32> [[INACTIVE:%.*]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
259*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
260*207e5cccSFangrui Song //
261*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_u32_mu12__SVUint32_tu10__SVBool_tS_(
262*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
263*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:%.*]])
264*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.rbit.nxv4i32(<vscale x 4 x i32> [[INACTIVE:%.*]], <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
265*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
266*207e5cccSFangrui Song //
267*207e5cccSFangrui Song svuint32_t test_svrbit_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR
268*207e5cccSFangrui Song {
269*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_u32,_m,)(inactive, pg, op);
270*207e5cccSFangrui Song }
271*207e5cccSFangrui Song 
272*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_u64_m(
273*207e5cccSFangrui Song // CHECK-NEXT:  entry:
274*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:%.*]])
275*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rbit.nxv2i64(<vscale x 2 x i64> [[INACTIVE:%.*]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
276*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
277*207e5cccSFangrui Song //
278*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_u64_mu12__SVUint64_tu10__SVBool_tS_(
279*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
280*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:%.*]])
281*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rbit.nxv2i64(<vscale x 2 x i64> [[INACTIVE:%.*]], <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
282*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
283*207e5cccSFangrui Song //
284*207e5cccSFangrui Song svuint64_t test_svrbit_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR
285*207e5cccSFangrui Song {
286*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_u64,_m,)(inactive, pg, op);
287*207e5cccSFangrui Song }
288*207e5cccSFangrui Song 
289*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_s8_x(
290*207e5cccSFangrui Song // CHECK-NEXT:  entry:
291*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.rbit.nxv16i8(<vscale x 16 x i8> undef, <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]])
292*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
293*207e5cccSFangrui Song //
294*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svrbit_s8_xu10__SVBool_tu10__SVInt8_t(
295*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
296*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.rbit.nxv16i8(<vscale x 16 x i8> undef, <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]])
297*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
298*207e5cccSFangrui Song //
299*207e5cccSFangrui Song svint8_t test_svrbit_s8_x(svbool_t pg, svint8_t op) MODE_ATTR
300*207e5cccSFangrui Song {
301*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_s8,_x,)(pg, op);
302*207e5cccSFangrui Song }
303*207e5cccSFangrui Song 
304*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_s16_x(
305*207e5cccSFangrui Song // CHECK-NEXT:  entry:
306*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:%.*]])
307*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.rbit.nxv8i16(<vscale x 8 x i16> undef, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
308*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
309*207e5cccSFangrui Song //
310*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_s16_xu10__SVBool_tu11__SVInt16_t(
311*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
312*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:%.*]])
313*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.rbit.nxv8i16(<vscale x 8 x i16> undef, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
314*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
315*207e5cccSFangrui Song //
316*207e5cccSFangrui Song svint16_t test_svrbit_s16_x(svbool_t pg, svint16_t op) MODE_ATTR
317*207e5cccSFangrui Song {
318*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_s16,_x,)(pg, op);
319*207e5cccSFangrui Song }
320*207e5cccSFangrui Song 
321*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_s32_x(
322*207e5cccSFangrui Song // CHECK-NEXT:  entry:
323*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:%.*]])
324*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.rbit.nxv4i32(<vscale x 4 x i32> undef, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
325*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
326*207e5cccSFangrui Song //
327*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_s32_xu10__SVBool_tu11__SVInt32_t(
328*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
329*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:%.*]])
330*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.rbit.nxv4i32(<vscale x 4 x i32> undef, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
331*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
332*207e5cccSFangrui Song //
333*207e5cccSFangrui Song svint32_t test_svrbit_s32_x(svbool_t pg, svint32_t op) MODE_ATTR
334*207e5cccSFangrui Song {
335*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_s32,_x,)(pg, op);
336*207e5cccSFangrui Song }
337*207e5cccSFangrui Song 
338*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_s64_x(
339*207e5cccSFangrui Song // CHECK-NEXT:  entry:
340*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:%.*]])
341*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rbit.nxv2i64(<vscale x 2 x i64> undef, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
342*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
343*207e5cccSFangrui Song //
344*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_s64_xu10__SVBool_tu11__SVInt64_t(
345*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
346*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:%.*]])
347*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rbit.nxv2i64(<vscale x 2 x i64> undef, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
348*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
349*207e5cccSFangrui Song //
350*207e5cccSFangrui Song svint64_t test_svrbit_s64_x(svbool_t pg, svint64_t op) MODE_ATTR
351*207e5cccSFangrui Song {
352*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_s64,_x,)(pg, op);
353*207e5cccSFangrui Song }
354*207e5cccSFangrui Song 
355*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_u8_x(
356*207e5cccSFangrui Song // CHECK-NEXT:  entry:
357*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.rbit.nxv16i8(<vscale x 16 x i8> undef, <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]])
358*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
359*207e5cccSFangrui Song //
360*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svrbit_u8_xu10__SVBool_tu11__SVUint8_t(
361*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
362*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.rbit.nxv16i8(<vscale x 16 x i8> undef, <vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]])
363*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
364*207e5cccSFangrui Song //
365*207e5cccSFangrui Song svuint8_t test_svrbit_u8_x(svbool_t pg, svuint8_t op) MODE_ATTR
366*207e5cccSFangrui Song {
367*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_u8,_x,)(pg, op);
368*207e5cccSFangrui Song }
369*207e5cccSFangrui Song 
370*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_u16_x(
371*207e5cccSFangrui Song // CHECK-NEXT:  entry:
372*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:%.*]])
373*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.rbit.nxv8i16(<vscale x 8 x i16> undef, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
374*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
375*207e5cccSFangrui Song //
376*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_u16_xu10__SVBool_tu12__SVUint16_t(
377*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
378*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:%.*]])
379*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.rbit.nxv8i16(<vscale x 8 x i16> undef, <vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]])
380*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]
381*207e5cccSFangrui Song //
382*207e5cccSFangrui Song svuint16_t test_svrbit_u16_x(svbool_t pg, svuint16_t op) MODE_ATTR
383*207e5cccSFangrui Song {
384*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_u16,_x,)(pg, op);
385*207e5cccSFangrui Song }
386*207e5cccSFangrui Song 
387*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_u32_x(
388*207e5cccSFangrui Song // CHECK-NEXT:  entry:
389*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:%.*]])
390*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.rbit.nxv4i32(<vscale x 4 x i32> undef, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
391*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
392*207e5cccSFangrui Song //
393*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_u32_xu10__SVBool_tu12__SVUint32_t(
394*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
395*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:%.*]])
396*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.rbit.nxv4i32(<vscale x 4 x i32> undef, <vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]])
397*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP1]]
398*207e5cccSFangrui Song //
399*207e5cccSFangrui Song svuint32_t test_svrbit_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR
400*207e5cccSFangrui Song {
401*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_u32,_x,)(pg, op);
402*207e5cccSFangrui Song }
403*207e5cccSFangrui Song 
404*207e5cccSFangrui Song // CHECK-LABEL: @test_svrbit_u64_x(
405*207e5cccSFangrui Song // CHECK-NEXT:  entry:
406*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:%.*]])
407*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rbit.nxv2i64(<vscale x 2 x i64> undef, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
408*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
409*207e5cccSFangrui Song //
410*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svrbit_u64_xu10__SVBool_tu12__SVUint64_t(
411*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
412*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:%.*]])
413*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rbit.nxv2i64(<vscale x 2 x i64> undef, <vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]])
414*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]
415*207e5cccSFangrui Song //
416*207e5cccSFangrui Song svuint64_t test_svrbit_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR
417*207e5cccSFangrui Song {
418*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svrbit,_u64,_x,)(pg, op);
419*207e5cccSFangrui Song }
420