xref: /llvm-project/clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_dupq.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 -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 -o /dev/null %s
8*207e5cccSFangrui Song // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -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_svdupq_lane_s8(
26*207e5cccSFangrui Song // CHECK-NEXT:  entry:
27*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.dupq.lane.nxv16i8(<vscale x 16 x i8> [[DATA:%.*]], i64 [[INDEX:%.*]])
28*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
29*207e5cccSFangrui Song //
30*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z19test_svdupq_lane_s8u10__SVInt8_tm(
31*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
32*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.dupq.lane.nxv16i8(<vscale x 16 x i8> [[DATA:%.*]], i64 [[INDEX:%.*]])
33*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
34*207e5cccSFangrui Song //
35*207e5cccSFangrui Song svint8_t test_svdupq_lane_s8(svint8_t data, uint64_t index) MODE_ATTR
36*207e5cccSFangrui Song {
37*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq_lane,_s8,,)(data, index);
38*207e5cccSFangrui Song }
39*207e5cccSFangrui Song 
40*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_lane_s16(
41*207e5cccSFangrui Song // CHECK-NEXT:  entry:
42*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.dupq.lane.nxv8i16(<vscale x 8 x i16> [[DATA:%.*]], i64 [[INDEX:%.*]])
43*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP0]]
44*207e5cccSFangrui Song //
45*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z20test_svdupq_lane_s16u11__SVInt16_tm(
46*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
47*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.dupq.lane.nxv8i16(<vscale x 8 x i16> [[DATA:%.*]], i64 [[INDEX:%.*]])
48*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP0]]
49*207e5cccSFangrui Song //
50*207e5cccSFangrui Song svint16_t test_svdupq_lane_s16(svint16_t data, uint64_t index) MODE_ATTR
51*207e5cccSFangrui Song {
52*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq_lane,_s16,,)(data, index);
53*207e5cccSFangrui Song }
54*207e5cccSFangrui Song 
55*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_lane_s32(
56*207e5cccSFangrui Song // CHECK-NEXT:  entry:
57*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.dupq.lane.nxv4i32(<vscale x 4 x i32> [[DATA:%.*]], i64 [[INDEX:%.*]])
58*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP0]]
59*207e5cccSFangrui Song //
60*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z20test_svdupq_lane_s32u11__SVInt32_tm(
61*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
62*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.dupq.lane.nxv4i32(<vscale x 4 x i32> [[DATA:%.*]], i64 [[INDEX:%.*]])
63*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP0]]
64*207e5cccSFangrui Song //
65*207e5cccSFangrui Song svint32_t test_svdupq_lane_s32(svint32_t data, uint64_t index) MODE_ATTR
66*207e5cccSFangrui Song {
67*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq_lane,_s32,,)(data, index);
68*207e5cccSFangrui Song }
69*207e5cccSFangrui Song 
70*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_lane_s64(
71*207e5cccSFangrui Song // CHECK-NEXT:  entry:
72*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.dupq.lane.nxv2i64(<vscale x 2 x i64> [[DATA:%.*]], i64 [[INDEX:%.*]])
73*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP0]]
74*207e5cccSFangrui Song //
75*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z20test_svdupq_lane_s64u11__SVInt64_tm(
76*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
77*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.dupq.lane.nxv2i64(<vscale x 2 x i64> [[DATA:%.*]], i64 [[INDEX:%.*]])
78*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP0]]
79*207e5cccSFangrui Song //
80*207e5cccSFangrui Song svint64_t test_svdupq_lane_s64(svint64_t data, uint64_t index) MODE_ATTR
81*207e5cccSFangrui Song {
82*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq_lane,_s64,,)(data, index);
83*207e5cccSFangrui Song }
84*207e5cccSFangrui Song 
85*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_lane_u8(
86*207e5cccSFangrui Song // CHECK-NEXT:  entry:
87*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.dupq.lane.nxv16i8(<vscale x 16 x i8> [[DATA:%.*]], i64 [[INDEX:%.*]])
88*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
89*207e5cccSFangrui Song //
90*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z19test_svdupq_lane_u8u11__SVUint8_tm(
91*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
92*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.dupq.lane.nxv16i8(<vscale x 16 x i8> [[DATA:%.*]], i64 [[INDEX:%.*]])
93*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
94*207e5cccSFangrui Song //
95*207e5cccSFangrui Song svuint8_t test_svdupq_lane_u8(svuint8_t data, uint64_t index) MODE_ATTR
96*207e5cccSFangrui Song {
97*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq_lane,_u8,,)(data, index);
98*207e5cccSFangrui Song }
99*207e5cccSFangrui Song 
100*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_lane_u16(
101*207e5cccSFangrui Song // CHECK-NEXT:  entry:
102*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.dupq.lane.nxv8i16(<vscale x 8 x i16> [[DATA:%.*]], i64 [[INDEX:%.*]])
103*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP0]]
104*207e5cccSFangrui Song //
105*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z20test_svdupq_lane_u16u12__SVUint16_tm(
106*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
107*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.dupq.lane.nxv8i16(<vscale x 8 x i16> [[DATA:%.*]], i64 [[INDEX:%.*]])
108*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP0]]
109*207e5cccSFangrui Song //
110*207e5cccSFangrui Song svuint16_t test_svdupq_lane_u16(svuint16_t data, uint64_t index) MODE_ATTR
111*207e5cccSFangrui Song {
112*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq_lane,_u16,,)(data, index);
113*207e5cccSFangrui Song }
114*207e5cccSFangrui Song 
115*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_lane_u32(
116*207e5cccSFangrui Song // CHECK-NEXT:  entry:
117*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.dupq.lane.nxv4i32(<vscale x 4 x i32> [[DATA:%.*]], i64 [[INDEX:%.*]])
118*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP0]]
119*207e5cccSFangrui Song //
120*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z20test_svdupq_lane_u32u12__SVUint32_tm(
121*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
122*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.dupq.lane.nxv4i32(<vscale x 4 x i32> [[DATA:%.*]], i64 [[INDEX:%.*]])
123*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP0]]
124*207e5cccSFangrui Song //
125*207e5cccSFangrui Song svuint32_t test_svdupq_lane_u32(svuint32_t data, uint64_t index) MODE_ATTR
126*207e5cccSFangrui Song {
127*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq_lane,_u32,,)(data, index);
128*207e5cccSFangrui Song }
129*207e5cccSFangrui Song 
130*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_lane_u64(
131*207e5cccSFangrui Song // CHECK-NEXT:  entry:
132*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.dupq.lane.nxv2i64(<vscale x 2 x i64> [[DATA:%.*]], i64 [[INDEX:%.*]])
133*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP0]]
134*207e5cccSFangrui Song //
135*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z20test_svdupq_lane_u64u12__SVUint64_tm(
136*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
137*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.dupq.lane.nxv2i64(<vscale x 2 x i64> [[DATA:%.*]], i64 [[INDEX:%.*]])
138*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP0]]
139*207e5cccSFangrui Song //
140*207e5cccSFangrui Song svuint64_t test_svdupq_lane_u64(svuint64_t data, uint64_t index) MODE_ATTR
141*207e5cccSFangrui Song {
142*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq_lane,_u64,,)(data, index);
143*207e5cccSFangrui Song }
144*207e5cccSFangrui Song 
145*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_lane_f16(
146*207e5cccSFangrui Song // CHECK-NEXT:  entry:
147*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x half> @llvm.aarch64.sve.dupq.lane.nxv8f16(<vscale x 8 x half> [[DATA:%.*]], i64 [[INDEX:%.*]])
148*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x half> [[TMP0]]
149*207e5cccSFangrui Song //
150*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z20test_svdupq_lane_f16u13__SVFloat16_tm(
151*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
152*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x half> @llvm.aarch64.sve.dupq.lane.nxv8f16(<vscale x 8 x half> [[DATA:%.*]], i64 [[INDEX:%.*]])
153*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x half> [[TMP0]]
154*207e5cccSFangrui Song //
155*207e5cccSFangrui Song svfloat16_t test_svdupq_lane_f16(svfloat16_t data, uint64_t index) MODE_ATTR
156*207e5cccSFangrui Song {
157*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq_lane,_f16,,)(data, index);
158*207e5cccSFangrui Song }
159*207e5cccSFangrui Song 
160*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_lane_f32(
161*207e5cccSFangrui Song // CHECK-NEXT:  entry:
162*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.dupq.lane.nxv4f32(<vscale x 4 x float> [[DATA:%.*]], i64 [[INDEX:%.*]])
163*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x float> [[TMP0]]
164*207e5cccSFangrui Song //
165*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z20test_svdupq_lane_f32u13__SVFloat32_tm(
166*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
167*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.dupq.lane.nxv4f32(<vscale x 4 x float> [[DATA:%.*]], i64 [[INDEX:%.*]])
168*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x float> [[TMP0]]
169*207e5cccSFangrui Song //
170*207e5cccSFangrui Song svfloat32_t test_svdupq_lane_f32(svfloat32_t data, uint64_t index) MODE_ATTR
171*207e5cccSFangrui Song {
172*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq_lane,_f32,,)(data, index);
173*207e5cccSFangrui Song }
174*207e5cccSFangrui Song 
175*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_lane_f64(
176*207e5cccSFangrui Song // CHECK-NEXT:  entry:
177*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x double> @llvm.aarch64.sve.dupq.lane.nxv2f64(<vscale x 2 x double> [[DATA:%.*]], i64 [[INDEX:%.*]])
178*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x double> [[TMP0]]
179*207e5cccSFangrui Song //
180*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z20test_svdupq_lane_f64u13__SVFloat64_tm(
181*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
182*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x double> @llvm.aarch64.sve.dupq.lane.nxv2f64(<vscale x 2 x double> [[DATA:%.*]], i64 [[INDEX:%.*]])
183*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x double> [[TMP0]]
184*207e5cccSFangrui Song //
185*207e5cccSFangrui Song svfloat64_t test_svdupq_lane_f64(svfloat64_t data, uint64_t index) MODE_ATTR
186*207e5cccSFangrui Song {
187*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq_lane,_f64,,)(data, index);
188*207e5cccSFangrui Song }
189*207e5cccSFangrui Song 
190*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_s8(
191*207e5cccSFangrui Song // CHECK-NEXT:  entry:
192*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertelement <16 x i8> poison, i8 [[X0:%.*]], i64 0
193*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertelement <16 x i8> [[TMP0]], i8 [[X1:%.*]], i64 1
194*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertelement <16 x i8> [[TMP1]], i8 [[X2:%.*]], i64 2
195*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = insertelement <16 x i8> [[TMP2]], i8 [[X3:%.*]], i64 3
196*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP4:%.*]] = insertelement <16 x i8> [[TMP3]], i8 [[X4:%.*]], i64 4
197*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP5:%.*]] = insertelement <16 x i8> [[TMP4]], i8 [[X5:%.*]], i64 5
198*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP6:%.*]] = insertelement <16 x i8> [[TMP5]], i8 [[X6:%.*]], i64 6
199*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP7:%.*]] = insertelement <16 x i8> [[TMP6]], i8 [[X7:%.*]], i64 7
200*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP8:%.*]] = insertelement <16 x i8> [[TMP7]], i8 [[X8:%.*]], i64 8
201*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP9:%.*]] = insertelement <16 x i8> [[TMP8]], i8 [[X9:%.*]], i64 9
202*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP10:%.*]] = insertelement <16 x i8> [[TMP9]], i8 [[X10:%.*]], i64 10
203*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP11:%.*]] = insertelement <16 x i8> [[TMP10]], i8 [[X11:%.*]], i64 11
204*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP12:%.*]] = insertelement <16 x i8> [[TMP11]], i8 [[X12:%.*]], i64 12
205*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP13:%.*]] = insertelement <16 x i8> [[TMP12]], i8 [[X13:%.*]], i64 13
206*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP14:%.*]] = insertelement <16 x i8> [[TMP13]], i8 [[X14:%.*]], i64 14
207*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP15:%.*]] = insertelement <16 x i8> [[TMP14]], i8 [[X15:%.*]], i64 15
208*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP16:%.*]] = tail call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v16i8(<vscale x 16 x i8> poison, <16 x i8> [[TMP15]], i64 0)
209*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP17:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.dupq.lane.nxv16i8(<vscale x 16 x i8> [[TMP16]], i64 0)
210*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP17]]
211*207e5cccSFangrui Song //
212*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svdupq_n_s8aaaaaaaaaaaaaaaa(
213*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
214*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertelement <16 x i8> poison, i8 [[X0:%.*]], i64 0
215*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertelement <16 x i8> [[TMP0]], i8 [[X1:%.*]], i64 1
216*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertelement <16 x i8> [[TMP1]], i8 [[X2:%.*]], i64 2
217*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = insertelement <16 x i8> [[TMP2]], i8 [[X3:%.*]], i64 3
218*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP4:%.*]] = insertelement <16 x i8> [[TMP3]], i8 [[X4:%.*]], i64 4
219*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP5:%.*]] = insertelement <16 x i8> [[TMP4]], i8 [[X5:%.*]], i64 5
220*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP6:%.*]] = insertelement <16 x i8> [[TMP5]], i8 [[X6:%.*]], i64 6
221*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP7:%.*]] = insertelement <16 x i8> [[TMP6]], i8 [[X7:%.*]], i64 7
222*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP8:%.*]] = insertelement <16 x i8> [[TMP7]], i8 [[X8:%.*]], i64 8
223*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP9:%.*]] = insertelement <16 x i8> [[TMP8]], i8 [[X9:%.*]], i64 9
224*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP10:%.*]] = insertelement <16 x i8> [[TMP9]], i8 [[X10:%.*]], i64 10
225*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP11:%.*]] = insertelement <16 x i8> [[TMP10]], i8 [[X11:%.*]], i64 11
226*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP12:%.*]] = insertelement <16 x i8> [[TMP11]], i8 [[X12:%.*]], i64 12
227*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP13:%.*]] = insertelement <16 x i8> [[TMP12]], i8 [[X13:%.*]], i64 13
228*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP14:%.*]] = insertelement <16 x i8> [[TMP13]], i8 [[X14:%.*]], i64 14
229*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP15:%.*]] = insertelement <16 x i8> [[TMP14]], i8 [[X15:%.*]], i64 15
230*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP16:%.*]] = tail call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v16i8(<vscale x 16 x i8> poison, <16 x i8> [[TMP15]], i64 0)
231*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP17:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.dupq.lane.nxv16i8(<vscale x 16 x i8> [[TMP16]], i64 0)
232*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP17]]
233*207e5cccSFangrui Song //
234*207e5cccSFangrui Song svint8_t test_svdupq_n_s8(int8_t x0, int8_t x1, int8_t x2, int8_t x3,
235*207e5cccSFangrui Song                           int8_t x4, int8_t x5, int8_t x6, int8_t x7,
236*207e5cccSFangrui Song                           int8_t x8, int8_t x9, int8_t x10, int8_t x11,
237*207e5cccSFangrui Song                           int8_t x12, int8_t x13, int8_t x14, int8_t x15) MODE_ATTR
238*207e5cccSFangrui Song {
239*207e5cccSFangrui Song   // <assume other insertelement>
240*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_s8,)(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15);
241*207e5cccSFangrui Song }
242*207e5cccSFangrui Song 
243*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_s16(
244*207e5cccSFangrui Song // CHECK-NEXT:  entry:
245*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertelement <8 x i16> poison, i16 [[X0:%.*]], i64 0
246*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertelement <8 x i16> [[TMP0]], i16 [[X1:%.*]], i64 1
247*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertelement <8 x i16> [[TMP1]], i16 [[X2:%.*]], i64 2
248*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = insertelement <8 x i16> [[TMP2]], i16 [[X3:%.*]], i64 3
249*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP4:%.*]] = insertelement <8 x i16> [[TMP3]], i16 [[X4:%.*]], i64 4
250*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP5:%.*]] = insertelement <8 x i16> [[TMP4]], i16 [[X5:%.*]], i64 5
251*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP6:%.*]] = insertelement <8 x i16> [[TMP5]], i16 [[X6:%.*]], i64 6
252*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP7:%.*]] = insertelement <8 x i16> [[TMP6]], i16 [[X7:%.*]], i64 7
253*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP8:%.*]] = tail call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v8i16(<vscale x 8 x i16> poison, <8 x i16> [[TMP7]], i64 0)
254*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP9:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.dupq.lane.nxv8i16(<vscale x 8 x i16> [[TMP8]], i64 0)
255*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP9]]
256*207e5cccSFangrui Song //
257*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svdupq_n_s16ssssssss(
258*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
259*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertelement <8 x i16> poison, i16 [[X0:%.*]], i64 0
260*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertelement <8 x i16> [[TMP0]], i16 [[X1:%.*]], i64 1
261*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertelement <8 x i16> [[TMP1]], i16 [[X2:%.*]], i64 2
262*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = insertelement <8 x i16> [[TMP2]], i16 [[X3:%.*]], i64 3
263*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP4:%.*]] = insertelement <8 x i16> [[TMP3]], i16 [[X4:%.*]], i64 4
264*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP5:%.*]] = insertelement <8 x i16> [[TMP4]], i16 [[X5:%.*]], i64 5
265*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP6:%.*]] = insertelement <8 x i16> [[TMP5]], i16 [[X6:%.*]], i64 6
266*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP7:%.*]] = insertelement <8 x i16> [[TMP6]], i16 [[X7:%.*]], i64 7
267*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP8:%.*]] = tail call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v8i16(<vscale x 8 x i16> poison, <8 x i16> [[TMP7]], i64 0)
268*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP9:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.dupq.lane.nxv8i16(<vscale x 8 x i16> [[TMP8]], i64 0)
269*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP9]]
270*207e5cccSFangrui Song //
271*207e5cccSFangrui Song svint16_t test_svdupq_n_s16(int16_t x0, int16_t x1, int16_t x2, int16_t x3,
272*207e5cccSFangrui Song                             int16_t x4, int16_t x5, int16_t x6, int16_t x7) MODE_ATTR
273*207e5cccSFangrui Song {
274*207e5cccSFangrui Song   // <assume other insertelement>
275*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_s16,)(x0, x1, x2, x3, x4, x5, x6, x7);
276*207e5cccSFangrui Song }
277*207e5cccSFangrui Song 
278*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_s32(
279*207e5cccSFangrui Song // CHECK-NEXT:  entry:
280*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertelement <4 x i32> poison, i32 [[X0:%.*]], i64 0
281*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertelement <4 x i32> [[TMP0]], i32 [[X1:%.*]], i64 1
282*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertelement <4 x i32> [[TMP1]], i32 [[X2:%.*]], i64 2
283*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = insertelement <4 x i32> [[TMP2]], i32 [[X3:%.*]], i64 3
284*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP4:%.*]] = tail call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v4i32(<vscale x 4 x i32> poison, <4 x i32> [[TMP3]], i64 0)
285*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP5:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.dupq.lane.nxv4i32(<vscale x 4 x i32> [[TMP4]], i64 0)
286*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP5]]
287*207e5cccSFangrui Song //
288*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svdupq_n_s32iiii(
289*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
290*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertelement <4 x i32> poison, i32 [[X0:%.*]], i64 0
291*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertelement <4 x i32> [[TMP0]], i32 [[X1:%.*]], i64 1
292*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertelement <4 x i32> [[TMP1]], i32 [[X2:%.*]], i64 2
293*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = insertelement <4 x i32> [[TMP2]], i32 [[X3:%.*]], i64 3
294*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP4:%.*]] = tail call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v4i32(<vscale x 4 x i32> poison, <4 x i32> [[TMP3]], i64 0)
295*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP5:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.dupq.lane.nxv4i32(<vscale x 4 x i32> [[TMP4]], i64 0)
296*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP5]]
297*207e5cccSFangrui Song //
298*207e5cccSFangrui Song svint32_t test_svdupq_n_s32(int32_t x0, int32_t x1, int32_t x2, int32_t x3) MODE_ATTR
299*207e5cccSFangrui Song {
300*207e5cccSFangrui Song   // <assume other insertelement>
301*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_s32,)(x0, x1, x2, x3);
302*207e5cccSFangrui Song }
303*207e5cccSFangrui Song 
304*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_s64(
305*207e5cccSFangrui Song // CHECK-NEXT:  entry:
306*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertelement <2 x i64> poison, i64 [[X0:%.*]], i64 0
307*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertelement <2 x i64> [[TMP0]], i64 [[X1:%.*]], i64 1
308*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = tail call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v2i64(<vscale x 2 x i64> poison, <2 x i64> [[TMP1]], i64 0)
309*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.dupq.lane.nxv2i64(<vscale x 2 x i64> [[TMP2]], i64 0)
310*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP3]]
311*207e5cccSFangrui Song //
312*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svdupq_n_s64ll(
313*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
314*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertelement <2 x i64> poison, i64 [[X0:%.*]], i64 0
315*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertelement <2 x i64> [[TMP0]], i64 [[X1:%.*]], i64 1
316*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = tail call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v2i64(<vscale x 2 x i64> poison, <2 x i64> [[TMP1]], i64 0)
317*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.dupq.lane.nxv2i64(<vscale x 2 x i64> [[TMP2]], i64 0)
318*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP3]]
319*207e5cccSFangrui Song //
320*207e5cccSFangrui Song svint64_t test_svdupq_n_s64(int64_t x0, int64_t x1) MODE_ATTR
321*207e5cccSFangrui Song {
322*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_s64,)(x0, x1);
323*207e5cccSFangrui Song }
324*207e5cccSFangrui Song 
325*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_u8(
326*207e5cccSFangrui Song // CHECK-NEXT:  entry:
327*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertelement <16 x i8> poison, i8 [[X0:%.*]], i64 0
328*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertelement <16 x i8> [[TMP0]], i8 [[X1:%.*]], i64 1
329*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertelement <16 x i8> [[TMP1]], i8 [[X2:%.*]], i64 2
330*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = insertelement <16 x i8> [[TMP2]], i8 [[X3:%.*]], i64 3
331*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP4:%.*]] = insertelement <16 x i8> [[TMP3]], i8 [[X4:%.*]], i64 4
332*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP5:%.*]] = insertelement <16 x i8> [[TMP4]], i8 [[X5:%.*]], i64 5
333*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP6:%.*]] = insertelement <16 x i8> [[TMP5]], i8 [[X6:%.*]], i64 6
334*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP7:%.*]] = insertelement <16 x i8> [[TMP6]], i8 [[X7:%.*]], i64 7
335*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP8:%.*]] = insertelement <16 x i8> [[TMP7]], i8 [[X8:%.*]], i64 8
336*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP9:%.*]] = insertelement <16 x i8> [[TMP8]], i8 [[X9:%.*]], i64 9
337*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP10:%.*]] = insertelement <16 x i8> [[TMP9]], i8 [[X10:%.*]], i64 10
338*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP11:%.*]] = insertelement <16 x i8> [[TMP10]], i8 [[X11:%.*]], i64 11
339*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP12:%.*]] = insertelement <16 x i8> [[TMP11]], i8 [[X12:%.*]], i64 12
340*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP13:%.*]] = insertelement <16 x i8> [[TMP12]], i8 [[X13:%.*]], i64 13
341*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP14:%.*]] = insertelement <16 x i8> [[TMP13]], i8 [[X14:%.*]], i64 14
342*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP15:%.*]] = insertelement <16 x i8> [[TMP14]], i8 [[X15:%.*]], i64 15
343*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP16:%.*]] = tail call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v16i8(<vscale x 16 x i8> poison, <16 x i8> [[TMP15]], i64 0)
344*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP17:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.dupq.lane.nxv16i8(<vscale x 16 x i8> [[TMP16]], i64 0)
345*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP17]]
346*207e5cccSFangrui Song //
347*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svdupq_n_u8hhhhhhhhhhhhhhhh(
348*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
349*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertelement <16 x i8> poison, i8 [[X0:%.*]], i64 0
350*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertelement <16 x i8> [[TMP0]], i8 [[X1:%.*]], i64 1
351*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertelement <16 x i8> [[TMP1]], i8 [[X2:%.*]], i64 2
352*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = insertelement <16 x i8> [[TMP2]], i8 [[X3:%.*]], i64 3
353*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP4:%.*]] = insertelement <16 x i8> [[TMP3]], i8 [[X4:%.*]], i64 4
354*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP5:%.*]] = insertelement <16 x i8> [[TMP4]], i8 [[X5:%.*]], i64 5
355*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP6:%.*]] = insertelement <16 x i8> [[TMP5]], i8 [[X6:%.*]], i64 6
356*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP7:%.*]] = insertelement <16 x i8> [[TMP6]], i8 [[X7:%.*]], i64 7
357*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP8:%.*]] = insertelement <16 x i8> [[TMP7]], i8 [[X8:%.*]], i64 8
358*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP9:%.*]] = insertelement <16 x i8> [[TMP8]], i8 [[X9:%.*]], i64 9
359*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP10:%.*]] = insertelement <16 x i8> [[TMP9]], i8 [[X10:%.*]], i64 10
360*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP11:%.*]] = insertelement <16 x i8> [[TMP10]], i8 [[X11:%.*]], i64 11
361*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP12:%.*]] = insertelement <16 x i8> [[TMP11]], i8 [[X12:%.*]], i64 12
362*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP13:%.*]] = insertelement <16 x i8> [[TMP12]], i8 [[X13:%.*]], i64 13
363*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP14:%.*]] = insertelement <16 x i8> [[TMP13]], i8 [[X14:%.*]], i64 14
364*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP15:%.*]] = insertelement <16 x i8> [[TMP14]], i8 [[X15:%.*]], i64 15
365*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP16:%.*]] = tail call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v16i8(<vscale x 16 x i8> poison, <16 x i8> [[TMP15]], i64 0)
366*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP17:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.dupq.lane.nxv16i8(<vscale x 16 x i8> [[TMP16]], i64 0)
367*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP17]]
368*207e5cccSFangrui Song //
369*207e5cccSFangrui Song svuint8_t test_svdupq_n_u8(uint8_t x0, uint8_t x1, uint8_t x2, uint8_t x3,
370*207e5cccSFangrui Song                            uint8_t x4, uint8_t x5, uint8_t x6, uint8_t x7,
371*207e5cccSFangrui Song                            uint8_t x8, uint8_t x9, uint8_t x10, uint8_t x11,
372*207e5cccSFangrui Song                            uint8_t x12, uint8_t x13, uint8_t x14, uint8_t x15) MODE_ATTR
373*207e5cccSFangrui Song {
374*207e5cccSFangrui Song   // <assume other insertelement>
375*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_u8,)(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15);
376*207e5cccSFangrui Song }
377*207e5cccSFangrui Song 
378*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_u16(
379*207e5cccSFangrui Song // CHECK-NEXT:  entry:
380*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertelement <8 x i16> poison, i16 [[X0:%.*]], i64 0
381*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertelement <8 x i16> [[TMP0]], i16 [[X1:%.*]], i64 1
382*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertelement <8 x i16> [[TMP1]], i16 [[X2:%.*]], i64 2
383*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = insertelement <8 x i16> [[TMP2]], i16 [[X3:%.*]], i64 3
384*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP4:%.*]] = insertelement <8 x i16> [[TMP3]], i16 [[X4:%.*]], i64 4
385*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP5:%.*]] = insertelement <8 x i16> [[TMP4]], i16 [[X5:%.*]], i64 5
386*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP6:%.*]] = insertelement <8 x i16> [[TMP5]], i16 [[X6:%.*]], i64 6
387*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP7:%.*]] = insertelement <8 x i16> [[TMP6]], i16 [[X7:%.*]], i64 7
388*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP8:%.*]] = tail call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v8i16(<vscale x 8 x i16> poison, <8 x i16> [[TMP7]], i64 0)
389*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP9:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.dupq.lane.nxv8i16(<vscale x 8 x i16> [[TMP8]], i64 0)
390*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP9]]
391*207e5cccSFangrui Song //
392*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svdupq_n_u16tttttttt(
393*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
394*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertelement <8 x i16> poison, i16 [[X0:%.*]], i64 0
395*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertelement <8 x i16> [[TMP0]], i16 [[X1:%.*]], i64 1
396*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertelement <8 x i16> [[TMP1]], i16 [[X2:%.*]], i64 2
397*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = insertelement <8 x i16> [[TMP2]], i16 [[X3:%.*]], i64 3
398*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP4:%.*]] = insertelement <8 x i16> [[TMP3]], i16 [[X4:%.*]], i64 4
399*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP5:%.*]] = insertelement <8 x i16> [[TMP4]], i16 [[X5:%.*]], i64 5
400*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP6:%.*]] = insertelement <8 x i16> [[TMP5]], i16 [[X6:%.*]], i64 6
401*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP7:%.*]] = insertelement <8 x i16> [[TMP6]], i16 [[X7:%.*]], i64 7
402*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP8:%.*]] = tail call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v8i16(<vscale x 8 x i16> poison, <8 x i16> [[TMP7]], i64 0)
403*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP9:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.dupq.lane.nxv8i16(<vscale x 8 x i16> [[TMP8]], i64 0)
404*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP9]]
405*207e5cccSFangrui Song //
406*207e5cccSFangrui Song svuint16_t test_svdupq_n_u16(uint16_t x0, uint16_t x1, uint16_t x2, uint16_t x3,
407*207e5cccSFangrui Song                              uint16_t x4, uint16_t x5, uint16_t x6, uint16_t x7) MODE_ATTR
408*207e5cccSFangrui Song {
409*207e5cccSFangrui Song   // <assume other insertelement>
410*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_u16,)(x0, x1, x2, x3, x4, x5, x6, x7);
411*207e5cccSFangrui Song }
412*207e5cccSFangrui Song 
413*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_u32(
414*207e5cccSFangrui Song // CHECK-NEXT:  entry:
415*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertelement <4 x i32> poison, i32 [[X0:%.*]], i64 0
416*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertelement <4 x i32> [[TMP0]], i32 [[X1:%.*]], i64 1
417*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertelement <4 x i32> [[TMP1]], i32 [[X2:%.*]], i64 2
418*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = insertelement <4 x i32> [[TMP2]], i32 [[X3:%.*]], i64 3
419*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP4:%.*]] = tail call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v4i32(<vscale x 4 x i32> poison, <4 x i32> [[TMP3]], i64 0)
420*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP5:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.dupq.lane.nxv4i32(<vscale x 4 x i32> [[TMP4]], i64 0)
421*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP5]]
422*207e5cccSFangrui Song //
423*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svdupq_n_u32jjjj(
424*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
425*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertelement <4 x i32> poison, i32 [[X0:%.*]], i64 0
426*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertelement <4 x i32> [[TMP0]], i32 [[X1:%.*]], i64 1
427*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertelement <4 x i32> [[TMP1]], i32 [[X2:%.*]], i64 2
428*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = insertelement <4 x i32> [[TMP2]], i32 [[X3:%.*]], i64 3
429*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP4:%.*]] = tail call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v4i32(<vscale x 4 x i32> poison, <4 x i32> [[TMP3]], i64 0)
430*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP5:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.dupq.lane.nxv4i32(<vscale x 4 x i32> [[TMP4]], i64 0)
431*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP5]]
432*207e5cccSFangrui Song //
433*207e5cccSFangrui Song svuint32_t test_svdupq_n_u32(uint32_t x0, uint32_t x1, uint32_t x2, uint32_t x3) MODE_ATTR
434*207e5cccSFangrui Song {
435*207e5cccSFangrui Song   // <assume other insertelement>
436*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_u32,)(x0, x1, x2, x3);
437*207e5cccSFangrui Song }
438*207e5cccSFangrui Song 
439*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_u64(
440*207e5cccSFangrui Song // CHECK-NEXT:  entry:
441*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertelement <2 x i64> poison, i64 [[X0:%.*]], i64 0
442*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertelement <2 x i64> [[TMP0]], i64 [[X1:%.*]], i64 1
443*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = tail call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v2i64(<vscale x 2 x i64> poison, <2 x i64> [[TMP1]], i64 0)
444*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.dupq.lane.nxv2i64(<vscale x 2 x i64> [[TMP2]], i64 0)
445*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP3]]
446*207e5cccSFangrui Song //
447*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svdupq_n_u64mm(
448*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
449*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertelement <2 x i64> poison, i64 [[X0:%.*]], i64 0
450*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertelement <2 x i64> [[TMP0]], i64 [[X1:%.*]], i64 1
451*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = tail call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v2i64(<vscale x 2 x i64> poison, <2 x i64> [[TMP1]], i64 0)
452*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.dupq.lane.nxv2i64(<vscale x 2 x i64> [[TMP2]], i64 0)
453*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP3]]
454*207e5cccSFangrui Song //
455*207e5cccSFangrui Song svuint64_t test_svdupq_n_u64(uint64_t x0, uint64_t x1) MODE_ATTR
456*207e5cccSFangrui Song {
457*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_u64,)(x0, x1);
458*207e5cccSFangrui Song }
459*207e5cccSFangrui Song 
460*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_f16(
461*207e5cccSFangrui Song // CHECK-NEXT:  entry:
462*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertelement <8 x half> poison, half [[X0:%.*]], i64 0
463*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertelement <8 x half> [[TMP0]], half [[X1:%.*]], i64 1
464*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertelement <8 x half> [[TMP1]], half [[X2:%.*]], i64 2
465*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = insertelement <8 x half> [[TMP2]], half [[X3:%.*]], i64 3
466*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP4:%.*]] = insertelement <8 x half> [[TMP3]], half [[X4:%.*]], i64 4
467*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP5:%.*]] = insertelement <8 x half> [[TMP4]], half [[X5:%.*]], i64 5
468*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP6:%.*]] = insertelement <8 x half> [[TMP5]], half [[X6:%.*]], i64 6
469*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP7:%.*]] = insertelement <8 x half> [[TMP6]], half [[X7:%.*]], i64 7
470*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP8:%.*]] = tail call <vscale x 8 x half> @llvm.vector.insert.nxv8f16.v8f16(<vscale x 8 x half> poison, <8 x half> [[TMP7]], i64 0)
471*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP9:%.*]] = tail call <vscale x 8 x half> @llvm.aarch64.sve.dupq.lane.nxv8f16(<vscale x 8 x half> [[TMP8]], i64 0)
472*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 8 x half> [[TMP9]]
473*207e5cccSFangrui Song //
474*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svdupq_n_f16DhDhDhDhDhDhDhDh(
475*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
476*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertelement <8 x half> poison, half [[X0:%.*]], i64 0
477*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertelement <8 x half> [[TMP0]], half [[X1:%.*]], i64 1
478*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertelement <8 x half> [[TMP1]], half [[X2:%.*]], i64 2
479*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = insertelement <8 x half> [[TMP2]], half [[X3:%.*]], i64 3
480*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP4:%.*]] = insertelement <8 x half> [[TMP3]], half [[X4:%.*]], i64 4
481*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP5:%.*]] = insertelement <8 x half> [[TMP4]], half [[X5:%.*]], i64 5
482*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP6:%.*]] = insertelement <8 x half> [[TMP5]], half [[X6:%.*]], i64 6
483*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP7:%.*]] = insertelement <8 x half> [[TMP6]], half [[X7:%.*]], i64 7
484*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP8:%.*]] = tail call <vscale x 8 x half> @llvm.vector.insert.nxv8f16.v8f16(<vscale x 8 x half> poison, <8 x half> [[TMP7]], i64 0)
485*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP9:%.*]] = tail call <vscale x 8 x half> @llvm.aarch64.sve.dupq.lane.nxv8f16(<vscale x 8 x half> [[TMP8]], i64 0)
486*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 8 x half> [[TMP9]]
487*207e5cccSFangrui Song //
488*207e5cccSFangrui Song svfloat16_t test_svdupq_n_f16(float16_t x0, float16_t x1, float16_t x2, float16_t x3,
489*207e5cccSFangrui Song                               float16_t x4, float16_t x5, float16_t x6, float16_t x7) MODE_ATTR
490*207e5cccSFangrui Song {
491*207e5cccSFangrui Song   // <assume other insertelement>
492*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_f16,)(x0, x1, x2, x3, x4, x5, x6, x7);
493*207e5cccSFangrui Song }
494*207e5cccSFangrui Song 
495*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_f32(
496*207e5cccSFangrui Song // CHECK-NEXT:  entry:
497*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertelement <4 x float> poison, float [[X0:%.*]], i64 0
498*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertelement <4 x float> [[TMP0]], float [[X1:%.*]], i64 1
499*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertelement <4 x float> [[TMP1]], float [[X2:%.*]], i64 2
500*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = insertelement <4 x float> [[TMP2]], float [[X3:%.*]], i64 3
501*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP4:%.*]] = tail call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v4f32(<vscale x 4 x float> poison, <4 x float> [[TMP3]], i64 0)
502*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP5:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.dupq.lane.nxv4f32(<vscale x 4 x float> [[TMP4]], i64 0)
503*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 4 x float> [[TMP5]]
504*207e5cccSFangrui Song //
505*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svdupq_n_f32ffff(
506*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
507*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertelement <4 x float> poison, float [[X0:%.*]], i64 0
508*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertelement <4 x float> [[TMP0]], float [[X1:%.*]], i64 1
509*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertelement <4 x float> [[TMP1]], float [[X2:%.*]], i64 2
510*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = insertelement <4 x float> [[TMP2]], float [[X3:%.*]], i64 3
511*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP4:%.*]] = tail call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v4f32(<vscale x 4 x float> poison, <4 x float> [[TMP3]], i64 0)
512*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP5:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.dupq.lane.nxv4f32(<vscale x 4 x float> [[TMP4]], i64 0)
513*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 4 x float> [[TMP5]]
514*207e5cccSFangrui Song //
515*207e5cccSFangrui Song svfloat32_t test_svdupq_n_f32(float32_t x0, float32_t x1, float32_t x2, float32_t x3) MODE_ATTR
516*207e5cccSFangrui Song {
517*207e5cccSFangrui Song   // <assume other insertelement>
518*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_f32,)(x0, x1, x2, x3);
519*207e5cccSFangrui Song }
520*207e5cccSFangrui Song 
521*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_f64(
522*207e5cccSFangrui Song // CHECK-NEXT:  entry:
523*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertelement <2 x double> poison, double [[X0:%.*]], i64 0
524*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertelement <2 x double> [[TMP0]], double [[X1:%.*]], i64 1
525*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = tail call <vscale x 2 x double> @llvm.vector.insert.nxv2f64.v2f64(<vscale x 2 x double> poison, <2 x double> [[TMP1]], i64 0)
526*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = tail call <vscale x 2 x double> @llvm.aarch64.sve.dupq.lane.nxv2f64(<vscale x 2 x double> [[TMP2]], i64 0)
527*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 2 x double> [[TMP3]]
528*207e5cccSFangrui Song //
529*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svdupq_n_f64dd(
530*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
531*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertelement <2 x double> poison, double [[X0:%.*]], i64 0
532*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertelement <2 x double> [[TMP0]], double [[X1:%.*]], i64 1
533*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = tail call <vscale x 2 x double> @llvm.vector.insert.nxv2f64.v2f64(<vscale x 2 x double> poison, <2 x double> [[TMP1]], i64 0)
534*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = tail call <vscale x 2 x double> @llvm.aarch64.sve.dupq.lane.nxv2f64(<vscale x 2 x double> [[TMP2]], i64 0)
535*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 2 x double> [[TMP3]]
536*207e5cccSFangrui Song //
537*207e5cccSFangrui Song svfloat64_t test_svdupq_n_f64(float64_t x0, float64_t x1) MODE_ATTR
538*207e5cccSFangrui Song {
539*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_f64,)(x0, x1);
540*207e5cccSFangrui Song }
541*207e5cccSFangrui Song 
542*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_b8(
543*207e5cccSFangrui Song // CHECK-NEXT:  entry:
544*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[X0:%.*]] to i8
545*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL1:%.*]] = zext i1 [[X1:%.*]] to i8
546*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL2:%.*]] = zext i1 [[X2:%.*]] to i8
547*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL3:%.*]] = zext i1 [[X3:%.*]] to i8
548*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL4:%.*]] = zext i1 [[X4:%.*]] to i8
549*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL5:%.*]] = zext i1 [[X5:%.*]] to i8
550*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL6:%.*]] = zext i1 [[X6:%.*]] to i8
551*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL7:%.*]] = zext i1 [[X7:%.*]] to i8
552*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL8:%.*]] = zext i1 [[X8:%.*]] to i8
553*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL9:%.*]] = zext i1 [[X9:%.*]] to i8
554*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL10:%.*]] = zext i1 [[X10:%.*]] to i8
555*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL11:%.*]] = zext i1 [[X11:%.*]] to i8
556*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL12:%.*]] = zext i1 [[X12:%.*]] to i8
557*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL13:%.*]] = zext i1 [[X13:%.*]] to i8
558*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL14:%.*]] = zext i1 [[X14:%.*]] to i8
559*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL15:%.*]] = zext i1 [[X15:%.*]] to i8
560*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[FROMBOOL]] to i1
561*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL16:%.*]] = trunc i8 [[FROMBOOL1]] to i1
562*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL17:%.*]] = trunc i8 [[FROMBOOL2]] to i1
563*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL18:%.*]] = trunc i8 [[FROMBOOL3]] to i1
564*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL19:%.*]] = trunc i8 [[FROMBOOL4]] to i1
565*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL20:%.*]] = trunc i8 [[FROMBOOL5]] to i1
566*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL21:%.*]] = trunc i8 [[FROMBOOL6]] to i1
567*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL22:%.*]] = trunc i8 [[FROMBOOL7]] to i1
568*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL23:%.*]] = trunc i8 [[FROMBOOL8]] to i1
569*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL24:%.*]] = trunc i8 [[FROMBOOL9]] to i1
570*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL25:%.*]] = trunc i8 [[FROMBOOL10]] to i1
571*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL26:%.*]] = trunc i8 [[FROMBOOL11]] to i1
572*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL27:%.*]] = trunc i8 [[FROMBOOL12]] to i1
573*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL28:%.*]] = trunc i8 [[FROMBOOL13]] to i1
574*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL29:%.*]] = trunc i8 [[FROMBOOL14]] to i1
575*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL30:%.*]] = trunc i8 [[FROMBOOL15]] to i1
576*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = zext i1 [[TOBOOL]] to i8
577*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = zext i1 [[TOBOOL16]] to i8
578*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = zext i1 [[TOBOOL17]] to i8
579*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = zext i1 [[TOBOOL18]] to i8
580*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP4:%.*]] = zext i1 [[TOBOOL19]] to i8
581*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP5:%.*]] = zext i1 [[TOBOOL20]] to i8
582*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP6:%.*]] = zext i1 [[TOBOOL21]] to i8
583*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP7:%.*]] = zext i1 [[TOBOOL22]] to i8
584*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP8:%.*]] = zext i1 [[TOBOOL23]] to i8
585*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP9:%.*]] = zext i1 [[TOBOOL24]] to i8
586*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP10:%.*]] = zext i1 [[TOBOOL25]] to i8
587*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP11:%.*]] = zext i1 [[TOBOOL26]] to i8
588*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP12:%.*]] = zext i1 [[TOBOOL27]] to i8
589*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP13:%.*]] = zext i1 [[TOBOOL28]] to i8
590*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP14:%.*]] = zext i1 [[TOBOOL29]] to i8
591*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP15:%.*]] = zext i1 [[TOBOOL30]] to i8
592*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP16:%.*]] = insertelement <16 x i8> poison, i8 [[TMP0]], i64 0
593*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP17:%.*]] = insertelement <16 x i8> [[TMP16]], i8 [[TMP1]], i64 1
594*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP18:%.*]] = insertelement <16 x i8> [[TMP17]], i8 [[TMP2]], i64 2
595*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP19:%.*]] = insertelement <16 x i8> [[TMP18]], i8 [[TMP3]], i64 3
596*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP20:%.*]] = insertelement <16 x i8> [[TMP19]], i8 [[TMP4]], i64 4
597*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP21:%.*]] = insertelement <16 x i8> [[TMP20]], i8 [[TMP5]], i64 5
598*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP22:%.*]] = insertelement <16 x i8> [[TMP21]], i8 [[TMP6]], i64 6
599*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP23:%.*]] = insertelement <16 x i8> [[TMP22]], i8 [[TMP7]], i64 7
600*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP24:%.*]] = insertelement <16 x i8> [[TMP23]], i8 [[TMP8]], i64 8
601*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP25:%.*]] = insertelement <16 x i8> [[TMP24]], i8 [[TMP9]], i64 9
602*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP26:%.*]] = insertelement <16 x i8> [[TMP25]], i8 [[TMP10]], i64 10
603*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP27:%.*]] = insertelement <16 x i8> [[TMP26]], i8 [[TMP11]], i64 11
604*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP28:%.*]] = insertelement <16 x i8> [[TMP27]], i8 [[TMP12]], i64 12
605*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP29:%.*]] = insertelement <16 x i8> [[TMP28]], i8 [[TMP13]], i64 13
606*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP30:%.*]] = insertelement <16 x i8> [[TMP29]], i8 [[TMP14]], i64 14
607*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP31:%.*]] = insertelement <16 x i8> [[TMP30]], i8 [[TMP15]], i64 15
608*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP32:%.*]] = tail call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v16i8(<vscale x 16 x i8> poison, <16 x i8> [[TMP31]], i64 0)
609*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP33:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.dupq.lane.nxv16i8(<vscale x 16 x i8> [[TMP32]], i64 0)
610*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP34:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.ptrue.nxv16i1(i32 31)
611*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP35:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.cmpne.wide.nxv16i8(<vscale x 16 x i1> [[TMP34]], <vscale x 16 x i8> [[TMP33]], <vscale x 2 x i64> zeroinitializer)
612*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP35]]
613*207e5cccSFangrui Song //
614*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z16test_svdupq_n_b8bbbbbbbbbbbbbbbb(
615*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
616*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[X0:%.*]] to i8
617*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL1:%.*]] = zext i1 [[X1:%.*]] to i8
618*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL2:%.*]] = zext i1 [[X2:%.*]] to i8
619*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL3:%.*]] = zext i1 [[X3:%.*]] to i8
620*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL4:%.*]] = zext i1 [[X4:%.*]] to i8
621*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL5:%.*]] = zext i1 [[X5:%.*]] to i8
622*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL6:%.*]] = zext i1 [[X6:%.*]] to i8
623*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL7:%.*]] = zext i1 [[X7:%.*]] to i8
624*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL8:%.*]] = zext i1 [[X8:%.*]] to i8
625*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL9:%.*]] = zext i1 [[X9:%.*]] to i8
626*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL10:%.*]] = zext i1 [[X10:%.*]] to i8
627*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL11:%.*]] = zext i1 [[X11:%.*]] to i8
628*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL12:%.*]] = zext i1 [[X12:%.*]] to i8
629*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL13:%.*]] = zext i1 [[X13:%.*]] to i8
630*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL14:%.*]] = zext i1 [[X14:%.*]] to i8
631*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL15:%.*]] = zext i1 [[X15:%.*]] to i8
632*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[FROMBOOL]] to i1
633*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL16:%.*]] = trunc i8 [[FROMBOOL1]] to i1
634*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL17:%.*]] = trunc i8 [[FROMBOOL2]] to i1
635*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL18:%.*]] = trunc i8 [[FROMBOOL3]] to i1
636*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL19:%.*]] = trunc i8 [[FROMBOOL4]] to i1
637*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL20:%.*]] = trunc i8 [[FROMBOOL5]] to i1
638*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL21:%.*]] = trunc i8 [[FROMBOOL6]] to i1
639*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL22:%.*]] = trunc i8 [[FROMBOOL7]] to i1
640*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL23:%.*]] = trunc i8 [[FROMBOOL8]] to i1
641*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL24:%.*]] = trunc i8 [[FROMBOOL9]] to i1
642*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL25:%.*]] = trunc i8 [[FROMBOOL10]] to i1
643*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL26:%.*]] = trunc i8 [[FROMBOOL11]] to i1
644*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL27:%.*]] = trunc i8 [[FROMBOOL12]] to i1
645*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL28:%.*]] = trunc i8 [[FROMBOOL13]] to i1
646*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL29:%.*]] = trunc i8 [[FROMBOOL14]] to i1
647*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL30:%.*]] = trunc i8 [[FROMBOOL15]] to i1
648*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = zext i1 [[TOBOOL]] to i8
649*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = zext i1 [[TOBOOL16]] to i8
650*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = zext i1 [[TOBOOL17]] to i8
651*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = zext i1 [[TOBOOL18]] to i8
652*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP4:%.*]] = zext i1 [[TOBOOL19]] to i8
653*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP5:%.*]] = zext i1 [[TOBOOL20]] to i8
654*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP6:%.*]] = zext i1 [[TOBOOL21]] to i8
655*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP7:%.*]] = zext i1 [[TOBOOL22]] to i8
656*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP8:%.*]] = zext i1 [[TOBOOL23]] to i8
657*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP9:%.*]] = zext i1 [[TOBOOL24]] to i8
658*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP10:%.*]] = zext i1 [[TOBOOL25]] to i8
659*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP11:%.*]] = zext i1 [[TOBOOL26]] to i8
660*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP12:%.*]] = zext i1 [[TOBOOL27]] to i8
661*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP13:%.*]] = zext i1 [[TOBOOL28]] to i8
662*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP14:%.*]] = zext i1 [[TOBOOL29]] to i8
663*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP15:%.*]] = zext i1 [[TOBOOL30]] to i8
664*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP16:%.*]] = insertelement <16 x i8> poison, i8 [[TMP0]], i64 0
665*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP17:%.*]] = insertelement <16 x i8> [[TMP16]], i8 [[TMP1]], i64 1
666*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP18:%.*]] = insertelement <16 x i8> [[TMP17]], i8 [[TMP2]], i64 2
667*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP19:%.*]] = insertelement <16 x i8> [[TMP18]], i8 [[TMP3]], i64 3
668*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP20:%.*]] = insertelement <16 x i8> [[TMP19]], i8 [[TMP4]], i64 4
669*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP21:%.*]] = insertelement <16 x i8> [[TMP20]], i8 [[TMP5]], i64 5
670*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP22:%.*]] = insertelement <16 x i8> [[TMP21]], i8 [[TMP6]], i64 6
671*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP23:%.*]] = insertelement <16 x i8> [[TMP22]], i8 [[TMP7]], i64 7
672*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP24:%.*]] = insertelement <16 x i8> [[TMP23]], i8 [[TMP8]], i64 8
673*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP25:%.*]] = insertelement <16 x i8> [[TMP24]], i8 [[TMP9]], i64 9
674*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP26:%.*]] = insertelement <16 x i8> [[TMP25]], i8 [[TMP10]], i64 10
675*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP27:%.*]] = insertelement <16 x i8> [[TMP26]], i8 [[TMP11]], i64 11
676*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP28:%.*]] = insertelement <16 x i8> [[TMP27]], i8 [[TMP12]], i64 12
677*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP29:%.*]] = insertelement <16 x i8> [[TMP28]], i8 [[TMP13]], i64 13
678*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP30:%.*]] = insertelement <16 x i8> [[TMP29]], i8 [[TMP14]], i64 14
679*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP31:%.*]] = insertelement <16 x i8> [[TMP30]], i8 [[TMP15]], i64 15
680*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP32:%.*]] = tail call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v16i8(<vscale x 16 x i8> poison, <16 x i8> [[TMP31]], i64 0)
681*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP33:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.dupq.lane.nxv16i8(<vscale x 16 x i8> [[TMP32]], i64 0)
682*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP34:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.ptrue.nxv16i1(i32 31)
683*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP35:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.cmpne.wide.nxv16i8(<vscale x 16 x i1> [[TMP34]], <vscale x 16 x i8> [[TMP33]], <vscale x 2 x i64> zeroinitializer)
684*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP35]]
685*207e5cccSFangrui Song //
686*207e5cccSFangrui Song svbool_t test_svdupq_n_b8(bool x0, bool x1, bool x2, bool x3,
687*207e5cccSFangrui Song                           bool x4, bool x5, bool x6, bool x7,
688*207e5cccSFangrui Song                           bool x8, bool x9, bool x10, bool x11,
689*207e5cccSFangrui Song                           bool x12, bool x13, bool x14, bool x15) MODE_ATTR
690*207e5cccSFangrui Song {
691*207e5cccSFangrui Song   // <assume other insertelement>
692*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_b8,)(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15);
693*207e5cccSFangrui Song }
694*207e5cccSFangrui Song 
695*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_b16(
696*207e5cccSFangrui Song // CHECK-NEXT:  entry:
697*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[X0:%.*]] to i8
698*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL1:%.*]] = zext i1 [[X1:%.*]] to i8
699*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL2:%.*]] = zext i1 [[X2:%.*]] to i8
700*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL3:%.*]] = zext i1 [[X3:%.*]] to i8
701*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL4:%.*]] = zext i1 [[X4:%.*]] to i8
702*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL5:%.*]] = zext i1 [[X5:%.*]] to i8
703*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL6:%.*]] = zext i1 [[X6:%.*]] to i8
704*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL7:%.*]] = zext i1 [[X7:%.*]] to i8
705*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[FROMBOOL]] to i1
706*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL8:%.*]] = trunc i8 [[FROMBOOL1]] to i1
707*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL9:%.*]] = trunc i8 [[FROMBOOL2]] to i1
708*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL10:%.*]] = trunc i8 [[FROMBOOL3]] to i1
709*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL11:%.*]] = trunc i8 [[FROMBOOL4]] to i1
710*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL12:%.*]] = trunc i8 [[FROMBOOL5]] to i1
711*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL13:%.*]] = trunc i8 [[FROMBOOL6]] to i1
712*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL14:%.*]] = trunc i8 [[FROMBOOL7]] to i1
713*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = zext i1 [[TOBOOL]] to i16
714*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = zext i1 [[TOBOOL8]] to i16
715*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = zext i1 [[TOBOOL9]] to i16
716*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = zext i1 [[TOBOOL10]] to i16
717*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP4:%.*]] = zext i1 [[TOBOOL11]] to i16
718*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP5:%.*]] = zext i1 [[TOBOOL12]] to i16
719*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP6:%.*]] = zext i1 [[TOBOOL13]] to i16
720*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP7:%.*]] = zext i1 [[TOBOOL14]] to i16
721*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP8:%.*]] = insertelement <8 x i16> poison, i16 [[TMP0]], i64 0
722*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP9:%.*]] = insertelement <8 x i16> [[TMP8]], i16 [[TMP1]], i64 1
723*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP10:%.*]] = insertelement <8 x i16> [[TMP9]], i16 [[TMP2]], i64 2
724*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP11:%.*]] = insertelement <8 x i16> [[TMP10]], i16 [[TMP3]], i64 3
725*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP12:%.*]] = insertelement <8 x i16> [[TMP11]], i16 [[TMP4]], i64 4
726*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP13:%.*]] = insertelement <8 x i16> [[TMP12]], i16 [[TMP5]], i64 5
727*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP14:%.*]] = insertelement <8 x i16> [[TMP13]], i16 [[TMP6]], i64 6
728*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP15:%.*]] = insertelement <8 x i16> [[TMP14]], i16 [[TMP7]], i64 7
729*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP16:%.*]] = tail call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v8i16(<vscale x 8 x i16> poison, <8 x i16> [[TMP15]], i64 0)
730*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP17:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.dupq.lane.nxv8i16(<vscale x 8 x i16> [[TMP16]], i64 0)
731*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP18:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.ptrue.nxv8i1(i32 31)
732*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP19:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.cmpne.wide.nxv8i16(<vscale x 8 x i1> [[TMP18]], <vscale x 8 x i16> [[TMP17]], <vscale x 2 x i64> zeroinitializer)
733*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP20:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1> [[TMP19]])
734*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP20]]
735*207e5cccSFangrui Song //
736*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svdupq_n_b16bbbbbbbb(
737*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
738*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[X0:%.*]] to i8
739*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL1:%.*]] = zext i1 [[X1:%.*]] to i8
740*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL2:%.*]] = zext i1 [[X2:%.*]] to i8
741*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL3:%.*]] = zext i1 [[X3:%.*]] to i8
742*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL4:%.*]] = zext i1 [[X4:%.*]] to i8
743*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL5:%.*]] = zext i1 [[X5:%.*]] to i8
744*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL6:%.*]] = zext i1 [[X6:%.*]] to i8
745*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL7:%.*]] = zext i1 [[X7:%.*]] to i8
746*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[FROMBOOL]] to i1
747*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL8:%.*]] = trunc i8 [[FROMBOOL1]] to i1
748*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL9:%.*]] = trunc i8 [[FROMBOOL2]] to i1
749*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL10:%.*]] = trunc i8 [[FROMBOOL3]] to i1
750*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL11:%.*]] = trunc i8 [[FROMBOOL4]] to i1
751*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL12:%.*]] = trunc i8 [[FROMBOOL5]] to i1
752*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL13:%.*]] = trunc i8 [[FROMBOOL6]] to i1
753*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL14:%.*]] = trunc i8 [[FROMBOOL7]] to i1
754*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = zext i1 [[TOBOOL]] to i16
755*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = zext i1 [[TOBOOL8]] to i16
756*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = zext i1 [[TOBOOL9]] to i16
757*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = zext i1 [[TOBOOL10]] to i16
758*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP4:%.*]] = zext i1 [[TOBOOL11]] to i16
759*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP5:%.*]] = zext i1 [[TOBOOL12]] to i16
760*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP6:%.*]] = zext i1 [[TOBOOL13]] to i16
761*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP7:%.*]] = zext i1 [[TOBOOL14]] to i16
762*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP8:%.*]] = insertelement <8 x i16> poison, i16 [[TMP0]], i64 0
763*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP9:%.*]] = insertelement <8 x i16> [[TMP8]], i16 [[TMP1]], i64 1
764*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP10:%.*]] = insertelement <8 x i16> [[TMP9]], i16 [[TMP2]], i64 2
765*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP11:%.*]] = insertelement <8 x i16> [[TMP10]], i16 [[TMP3]], i64 3
766*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP12:%.*]] = insertelement <8 x i16> [[TMP11]], i16 [[TMP4]], i64 4
767*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP13:%.*]] = insertelement <8 x i16> [[TMP12]], i16 [[TMP5]], i64 5
768*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP14:%.*]] = insertelement <8 x i16> [[TMP13]], i16 [[TMP6]], i64 6
769*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP15:%.*]] = insertelement <8 x i16> [[TMP14]], i16 [[TMP7]], i64 7
770*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP16:%.*]] = tail call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v8i16(<vscale x 8 x i16> poison, <8 x i16> [[TMP15]], i64 0)
771*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP17:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.dupq.lane.nxv8i16(<vscale x 8 x i16> [[TMP16]], i64 0)
772*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP18:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.ptrue.nxv8i1(i32 31)
773*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP19:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.cmpne.wide.nxv8i16(<vscale x 8 x i1> [[TMP18]], <vscale x 8 x i16> [[TMP17]], <vscale x 2 x i64> zeroinitializer)
774*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP20:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1> [[TMP19]])
775*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP20]]
776*207e5cccSFangrui Song //
777*207e5cccSFangrui Song svbool_t test_svdupq_n_b16(bool x0, bool x1, bool x2, bool x3,
778*207e5cccSFangrui Song                            bool x4, bool x5, bool x6, bool x7) MODE_ATTR
779*207e5cccSFangrui Song {
780*207e5cccSFangrui Song   // <assume other insertelement>
781*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_b16,)(x0, x1, x2, x3, x4, x5, x6, x7);
782*207e5cccSFangrui Song }
783*207e5cccSFangrui Song 
784*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_b32(
785*207e5cccSFangrui Song // CHECK-NEXT:  entry:
786*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[X0:%.*]] to i8
787*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL1:%.*]] = zext i1 [[X1:%.*]] to i8
788*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL2:%.*]] = zext i1 [[X2:%.*]] to i8
789*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL3:%.*]] = zext i1 [[X3:%.*]] to i8
790*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[FROMBOOL]] to i1
791*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL4:%.*]] = trunc i8 [[FROMBOOL1]] to i1
792*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL5:%.*]] = trunc i8 [[FROMBOOL2]] to i1
793*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL6:%.*]] = trunc i8 [[FROMBOOL3]] to i1
794*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = zext i1 [[TOBOOL]] to i32
795*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = zext i1 [[TOBOOL4]] to i32
796*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = zext i1 [[TOBOOL5]] to i32
797*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = zext i1 [[TOBOOL6]] to i32
798*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP4:%.*]] = insertelement <4 x i32> poison, i32 [[TMP0]], i64 0
799*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP5:%.*]] = insertelement <4 x i32> [[TMP4]], i32 [[TMP1]], i64 1
800*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP6:%.*]] = insertelement <4 x i32> [[TMP5]], i32 [[TMP2]], i64 2
801*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP7:%.*]] = insertelement <4 x i32> [[TMP6]], i32 [[TMP3]], i64 3
802*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP8:%.*]] = tail call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v4i32(<vscale x 4 x i32> poison, <4 x i32> [[TMP7]], i64 0)
803*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP9:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.dupq.lane.nxv4i32(<vscale x 4 x i32> [[TMP8]], i64 0)
804*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP10:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.ptrue.nxv4i1(i32 31)
805*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP11:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.cmpne.wide.nxv4i32(<vscale x 4 x i1> [[TMP10]], <vscale x 4 x i32> [[TMP9]], <vscale x 2 x i64> zeroinitializer)
806*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP12:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> [[TMP11]])
807*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP12]]
808*207e5cccSFangrui Song //
809*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svdupq_n_b32bbbb(
810*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
811*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[X0:%.*]] to i8
812*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL1:%.*]] = zext i1 [[X1:%.*]] to i8
813*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL2:%.*]] = zext i1 [[X2:%.*]] to i8
814*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL3:%.*]] = zext i1 [[X3:%.*]] to i8
815*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[FROMBOOL]] to i1
816*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL4:%.*]] = trunc i8 [[FROMBOOL1]] to i1
817*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL5:%.*]] = trunc i8 [[FROMBOOL2]] to i1
818*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL6:%.*]] = trunc i8 [[FROMBOOL3]] to i1
819*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = zext i1 [[TOBOOL]] to i32
820*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = zext i1 [[TOBOOL4]] to i32
821*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = zext i1 [[TOBOOL5]] to i32
822*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = zext i1 [[TOBOOL6]] to i32
823*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP4:%.*]] = insertelement <4 x i32> poison, i32 [[TMP0]], i64 0
824*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP5:%.*]] = insertelement <4 x i32> [[TMP4]], i32 [[TMP1]], i64 1
825*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP6:%.*]] = insertelement <4 x i32> [[TMP5]], i32 [[TMP2]], i64 2
826*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP7:%.*]] = insertelement <4 x i32> [[TMP6]], i32 [[TMP3]], i64 3
827*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP8:%.*]] = tail call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v4i32(<vscale x 4 x i32> poison, <4 x i32> [[TMP7]], i64 0)
828*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP9:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.dupq.lane.nxv4i32(<vscale x 4 x i32> [[TMP8]], i64 0)
829*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP10:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.ptrue.nxv4i1(i32 31)
830*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP11:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.cmpne.wide.nxv4i32(<vscale x 4 x i1> [[TMP10]], <vscale x 4 x i32> [[TMP9]], <vscale x 2 x i64> zeroinitializer)
831*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP12:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> [[TMP11]])
832*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP12]]
833*207e5cccSFangrui Song //
834*207e5cccSFangrui Song svbool_t test_svdupq_n_b32(bool x0, bool x1, bool x2, bool x3) MODE_ATTR
835*207e5cccSFangrui Song {
836*207e5cccSFangrui Song   // <assume other insertelement>
837*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_b32,)(x0, x1, x2, x3);
838*207e5cccSFangrui Song }
839*207e5cccSFangrui Song 
840*207e5cccSFangrui Song // CHECK-LABEL: @test_svdupq_n_b64(
841*207e5cccSFangrui Song // CHECK-NEXT:  entry:
842*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[X0:%.*]] to i8
843*207e5cccSFangrui Song // CHECK-NEXT:    [[FROMBOOL1:%.*]] = zext i1 [[X1:%.*]] to i8
844*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[FROMBOOL]] to i1
845*207e5cccSFangrui Song // CHECK-NEXT:    [[TOBOOL2:%.*]] = trunc i8 [[FROMBOOL1]] to i1
846*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = zext i1 [[TOBOOL]] to i64
847*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = zext i1 [[TOBOOL2]] to i64
848*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertelement <2 x i64> poison, i64 [[TMP0]], i64 0
849*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP3:%.*]] = insertelement <2 x i64> [[TMP2]], i64 [[TMP1]], i64 1
850*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP4:%.*]] = tail call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v2i64(<vscale x 2 x i64> poison, <2 x i64> [[TMP3]], i64 0)
851*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP5:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.dupq.lane.nxv2i64(<vscale x 2 x i64> [[TMP4]], i64 0)
852*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP6:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.ptrue.nxv2i1(i32 31)
853*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP7:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.cmpne.nxv2i64(<vscale x 2 x i1> [[TMP6]], <vscale x 2 x i64> [[TMP5]], <vscale x 2 x i64> zeroinitializer)
854*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP8:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1> [[TMP7]])
855*207e5cccSFangrui Song // CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP8]]
856*207e5cccSFangrui Song //
857*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svdupq_n_b64bb(
858*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
859*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[X0:%.*]] to i8
860*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[FROMBOOL1:%.*]] = zext i1 [[X1:%.*]] to i8
861*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[FROMBOOL]] to i1
862*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TOBOOL2:%.*]] = trunc i8 [[FROMBOOL1]] to i1
863*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = zext i1 [[TOBOOL]] to i64
864*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = zext i1 [[TOBOOL2]] to i64
865*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertelement <2 x i64> poison, i64 [[TMP0]], i64 0
866*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP3:%.*]] = insertelement <2 x i64> [[TMP2]], i64 [[TMP1]], i64 1
867*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP4:%.*]] = tail call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v2i64(<vscale x 2 x i64> poison, <2 x i64> [[TMP3]], i64 0)
868*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP5:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.dupq.lane.nxv2i64(<vscale x 2 x i64> [[TMP4]], i64 0)
869*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP6:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.ptrue.nxv2i1(i32 31)
870*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP7:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.cmpne.nxv2i64(<vscale x 2 x i1> [[TMP6]], <vscale x 2 x i64> [[TMP5]], <vscale x 2 x i64> zeroinitializer)
871*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP8:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1> [[TMP7]])
872*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP8]]
873*207e5cccSFangrui Song //
874*207e5cccSFangrui Song svbool_t test_svdupq_n_b64(bool x0, bool x1) MODE_ATTR
875*207e5cccSFangrui Song {
876*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svdupq,_n,_b64,)(x0, x1);
877*207e5cccSFangrui Song }
878