1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
4 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
5 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
6 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
7 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
11 #ifdef SVE_OVERLOADED_FORMS
12 // A simple used,unused... macro, long enough to represent any SVE builtin.
13 #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
15 #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
18 // CHECK-LABEL: @test_svldnt1_s8(
20 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.ldnt1.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]])
21 // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]]
23 // CPP-CHECK-LABEL: @_Z15test_svldnt1_s8u10__SVBool_tPKa(
24 // CPP-CHECK-NEXT: entry:
25 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.ldnt1.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]])
26 // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]]
28 svint8_t
test_svldnt1_s8(svbool_t pg
, const int8_t *base
)
30 return SVE_ACLE_FUNC(svldnt1
,_s8
,,)(pg
, base
);
33 // CHECK-LABEL: @test_svldnt1_s16(
35 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]])
36 // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.ldnt1.nxv8i16(<vscale x 8 x i1> [[TMP0]], ptr [[BASE:%.*]])
37 // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]]
39 // CPP-CHECK-LABEL: @_Z16test_svldnt1_s16u10__SVBool_tPKs(
40 // CPP-CHECK-NEXT: entry:
41 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]])
42 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.ldnt1.nxv8i16(<vscale x 8 x i1> [[TMP0]], ptr [[BASE:%.*]])
43 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]]
45 svint16_t
test_svldnt1_s16(svbool_t pg
, const int16_t *base
)
47 return SVE_ACLE_FUNC(svldnt1
,_s16
,,)(pg
, base
);
50 // CHECK-LABEL: @test_svldnt1_s32(
52 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
53 // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.ldnt1.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]])
54 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]]
56 // CPP-CHECK-LABEL: @_Z16test_svldnt1_s32u10__SVBool_tPKi(
57 // CPP-CHECK-NEXT: entry:
58 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
59 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.ldnt1.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]])
60 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]]
62 svint32_t
test_svldnt1_s32(svbool_t pg
, const int32_t *base
)
64 return SVE_ACLE_FUNC(svldnt1
,_s32
,,)(pg
, base
);
67 // CHECK-LABEL: @test_svldnt1_s64(
69 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
70 // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.ldnt1.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]])
71 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP1]]
73 // CPP-CHECK-LABEL: @_Z16test_svldnt1_s64u10__SVBool_tPKl(
74 // CPP-CHECK-NEXT: entry:
75 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
76 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.ldnt1.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]])
77 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP1]]
79 svint64_t
test_svldnt1_s64(svbool_t pg
, const int64_t *base
)
81 return SVE_ACLE_FUNC(svldnt1
,_s64
,,)(pg
, base
);
84 // CHECK-LABEL: @test_svldnt1_u8(
86 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.ldnt1.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]])
87 // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]]
89 // CPP-CHECK-LABEL: @_Z15test_svldnt1_u8u10__SVBool_tPKh(
90 // CPP-CHECK-NEXT: entry:
91 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.ldnt1.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]])
92 // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]]
94 svuint8_t
test_svldnt1_u8(svbool_t pg
, const uint8_t *base
)
96 return SVE_ACLE_FUNC(svldnt1
,_u8
,,)(pg
, base
);
99 // CHECK-LABEL: @test_svldnt1_u16(
100 // CHECK-NEXT: entry:
101 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]])
102 // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.ldnt1.nxv8i16(<vscale x 8 x i1> [[TMP0]], ptr [[BASE:%.*]])
103 // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]]
105 // CPP-CHECK-LABEL: @_Z16test_svldnt1_u16u10__SVBool_tPKt(
106 // CPP-CHECK-NEXT: entry:
107 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]])
108 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.ldnt1.nxv8i16(<vscale x 8 x i1> [[TMP0]], ptr [[BASE:%.*]])
109 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP1]]
111 svuint16_t
test_svldnt1_u16(svbool_t pg
, const uint16_t *base
)
113 return SVE_ACLE_FUNC(svldnt1
,_u16
,,)(pg
, base
);
116 // CHECK-LABEL: @test_svldnt1_u32(
117 // CHECK-NEXT: entry:
118 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
119 // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.ldnt1.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]])
120 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]]
122 // CPP-CHECK-LABEL: @_Z16test_svldnt1_u32u10__SVBool_tPKj(
123 // CPP-CHECK-NEXT: entry:
124 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
125 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.ldnt1.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]])
126 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]]
128 svuint32_t
test_svldnt1_u32(svbool_t pg
, const uint32_t *base
)
130 return SVE_ACLE_FUNC(svldnt1
,_u32
,,)(pg
, base
);
133 // CHECK-LABEL: @test_svldnt1_u64(
134 // CHECK-NEXT: entry:
135 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
136 // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.ldnt1.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]])
137 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP1]]
139 // CPP-CHECK-LABEL: @_Z16test_svldnt1_u64u10__SVBool_tPKm(
140 // CPP-CHECK-NEXT: entry:
141 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
142 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.ldnt1.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]])
143 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP1]]
145 svuint64_t
test_svldnt1_u64(svbool_t pg
, const uint64_t *base
)
147 return SVE_ACLE_FUNC(svldnt1
,_u64
,,)(pg
, base
);
150 // CHECK-LABEL: @test_svldnt1_f16(
151 // CHECK-NEXT: entry:
152 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]])
153 // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x half> @llvm.aarch64.sve.ldnt1.nxv8f16(<vscale x 8 x i1> [[TMP0]], ptr [[BASE:%.*]])
154 // CHECK-NEXT: ret <vscale x 8 x half> [[TMP1]]
156 // CPP-CHECK-LABEL: @_Z16test_svldnt1_f16u10__SVBool_tPKDh(
157 // CPP-CHECK-NEXT: entry:
158 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]])
159 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 8 x half> @llvm.aarch64.sve.ldnt1.nxv8f16(<vscale x 8 x i1> [[TMP0]], ptr [[BASE:%.*]])
160 // CPP-CHECK-NEXT: ret <vscale x 8 x half> [[TMP1]]
162 svfloat16_t
test_svldnt1_f16(svbool_t pg
, const float16_t
*base
)
164 return SVE_ACLE_FUNC(svldnt1
,_f16
,,)(pg
, base
);
167 // CHECK-LABEL: @test_svldnt1_f32(
168 // CHECK-NEXT: entry:
169 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
170 // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.ldnt1.nxv4f32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]])
171 // CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]
173 // CPP-CHECK-LABEL: @_Z16test_svldnt1_f32u10__SVBool_tPKf(
174 // CPP-CHECK-NEXT: entry:
175 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
176 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.ldnt1.nxv4f32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]])
177 // CPP-CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]
179 svfloat32_t
test_svldnt1_f32(svbool_t pg
, const float32_t
*base
)
181 return SVE_ACLE_FUNC(svldnt1
,_f32
,,)(pg
, base
);
184 // CHECK-LABEL: @test_svldnt1_f64(
185 // CHECK-NEXT: entry:
186 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
187 // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x double> @llvm.aarch64.sve.ldnt1.nxv2f64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]])
188 // CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]
190 // CPP-CHECK-LABEL: @_Z16test_svldnt1_f64u10__SVBool_tPKd(
191 // CPP-CHECK-NEXT: entry:
192 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
193 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 2 x double> @llvm.aarch64.sve.ldnt1.nxv2f64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]])
194 // CPP-CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]
196 svfloat64_t
test_svldnt1_f64(svbool_t pg
, const float64_t
*base
)
198 return SVE_ACLE_FUNC(svldnt1
,_f64
,,)(pg
, base
);
201 // CHECK-LABEL: @test_svldnt1_vnum_s8(
202 // CHECK-NEXT: entry:
203 // CHECK-NEXT: [[TMP0:%.*]] = getelementptr <vscale x 16 x i8>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
204 // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.ldnt1.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], ptr [[TMP0]])
205 // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP1]]
207 // CPP-CHECK-LABEL: @_Z20test_svldnt1_vnum_s8u10__SVBool_tPKal(
208 // CPP-CHECK-NEXT: entry:
209 // CPP-CHECK-NEXT: [[TMP0:%.*]] = getelementptr <vscale x 16 x i8>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
210 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.ldnt1.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], ptr [[TMP0]])
211 // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP1]]
213 svint8_t
test_svldnt1_vnum_s8(svbool_t pg
, const int8_t *base
, int64_t vnum
)
215 return SVE_ACLE_FUNC(svldnt1_vnum
,_s8
,,)(pg
, base
, vnum
);
218 // CHECK-LABEL: @test_svldnt1_vnum_s16(
219 // CHECK-NEXT: entry:
220 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]])
221 // CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 8 x i16>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
222 // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.ldnt1.nxv8i16(<vscale x 8 x i1> [[TMP0]], ptr [[TMP1]])
223 // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP2]]
225 // CPP-CHECK-LABEL: @_Z21test_svldnt1_vnum_s16u10__SVBool_tPKsl(
226 // CPP-CHECK-NEXT: entry:
227 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]])
228 // CPP-CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 8 x i16>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
229 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.ldnt1.nxv8i16(<vscale x 8 x i1> [[TMP0]], ptr [[TMP1]])
230 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP2]]
232 svint16_t
test_svldnt1_vnum_s16(svbool_t pg
, const int16_t *base
, int64_t vnum
)
234 return SVE_ACLE_FUNC(svldnt1_vnum
,_s16
,,)(pg
, base
, vnum
);
237 // CHECK-LABEL: @test_svldnt1_vnum_s32(
238 // CHECK-NEXT: entry:
239 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
240 // CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 4 x i32>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
241 // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.ldnt1.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[TMP1]])
242 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP2]]
244 // CPP-CHECK-LABEL: @_Z21test_svldnt1_vnum_s32u10__SVBool_tPKil(
245 // CPP-CHECK-NEXT: entry:
246 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
247 // CPP-CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 4 x i32>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
248 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.ldnt1.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[TMP1]])
249 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP2]]
251 svint32_t
test_svldnt1_vnum_s32(svbool_t pg
, const int32_t *base
, int64_t vnum
)
253 return SVE_ACLE_FUNC(svldnt1_vnum
,_s32
,,)(pg
, base
, vnum
);
256 // CHECK-LABEL: @test_svldnt1_vnum_s64(
257 // CHECK-NEXT: entry:
258 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
259 // CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 2 x i64>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
260 // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.ldnt1.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[TMP1]])
261 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP2]]
263 // CPP-CHECK-LABEL: @_Z21test_svldnt1_vnum_s64u10__SVBool_tPKll(
264 // CPP-CHECK-NEXT: entry:
265 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
266 // CPP-CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 2 x i64>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
267 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.ldnt1.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[TMP1]])
268 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP2]]
270 svint64_t
test_svldnt1_vnum_s64(svbool_t pg
, const int64_t *base
, int64_t vnum
)
272 return SVE_ACLE_FUNC(svldnt1_vnum
,_s64
,,)(pg
, base
, vnum
);
275 // CHECK-LABEL: @test_svldnt1_vnum_u8(
276 // CHECK-NEXT: entry:
277 // CHECK-NEXT: [[TMP0:%.*]] = getelementptr <vscale x 16 x i8>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
278 // CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.ldnt1.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], ptr [[TMP0]])
279 // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP1]]
281 // CPP-CHECK-LABEL: @_Z20test_svldnt1_vnum_u8u10__SVBool_tPKhl(
282 // CPP-CHECK-NEXT: entry:
283 // CPP-CHECK-NEXT: [[TMP0:%.*]] = getelementptr <vscale x 16 x i8>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
284 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.ldnt1.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], ptr [[TMP0]])
285 // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP1]]
287 svuint8_t
test_svldnt1_vnum_u8(svbool_t pg
, const uint8_t *base
, int64_t vnum
)
289 return SVE_ACLE_FUNC(svldnt1_vnum
,_u8
,,)(pg
, base
, vnum
);
292 // CHECK-LABEL: @test_svldnt1_vnum_u16(
293 // CHECK-NEXT: entry:
294 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]])
295 // CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 8 x i16>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
296 // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.ldnt1.nxv8i16(<vscale x 8 x i1> [[TMP0]], ptr [[TMP1]])
297 // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP2]]
299 // CPP-CHECK-LABEL: @_Z21test_svldnt1_vnum_u16u10__SVBool_tPKtl(
300 // CPP-CHECK-NEXT: entry:
301 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]])
302 // CPP-CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 8 x i16>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
303 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.ldnt1.nxv8i16(<vscale x 8 x i1> [[TMP0]], ptr [[TMP1]])
304 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP2]]
306 svuint16_t
test_svldnt1_vnum_u16(svbool_t pg
, const uint16_t *base
, int64_t vnum
)
308 return SVE_ACLE_FUNC(svldnt1_vnum
,_u16
,,)(pg
, base
, vnum
);
311 // CHECK-LABEL: @test_svldnt1_vnum_u32(
312 // CHECK-NEXT: entry:
313 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
314 // CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 4 x i32>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
315 // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.ldnt1.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[TMP1]])
316 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP2]]
318 // CPP-CHECK-LABEL: @_Z21test_svldnt1_vnum_u32u10__SVBool_tPKjl(
319 // CPP-CHECK-NEXT: entry:
320 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
321 // CPP-CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 4 x i32>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
322 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.ldnt1.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[TMP1]])
323 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP2]]
325 svuint32_t
test_svldnt1_vnum_u32(svbool_t pg
, const uint32_t *base
, int64_t vnum
)
327 return SVE_ACLE_FUNC(svldnt1_vnum
,_u32
,,)(pg
, base
, vnum
);
330 // CHECK-LABEL: @test_svldnt1_vnum_u64(
331 // CHECK-NEXT: entry:
332 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
333 // CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 2 x i64>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
334 // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.ldnt1.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[TMP1]])
335 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP2]]
337 // CPP-CHECK-LABEL: @_Z21test_svldnt1_vnum_u64u10__SVBool_tPKml(
338 // CPP-CHECK-NEXT: entry:
339 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
340 // CPP-CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 2 x i64>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
341 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.ldnt1.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[TMP1]])
342 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP2]]
344 svuint64_t
test_svldnt1_vnum_u64(svbool_t pg
, const uint64_t *base
, int64_t vnum
)
346 return SVE_ACLE_FUNC(svldnt1_vnum
,_u64
,,)(pg
, base
, vnum
);
349 // CHECK-LABEL: @test_svldnt1_vnum_f16(
350 // CHECK-NEXT: entry:
351 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]])
352 // CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 8 x half>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
353 // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x half> @llvm.aarch64.sve.ldnt1.nxv8f16(<vscale x 8 x i1> [[TMP0]], ptr [[TMP1]])
354 // CHECK-NEXT: ret <vscale x 8 x half> [[TMP2]]
356 // CPP-CHECK-LABEL: @_Z21test_svldnt1_vnum_f16u10__SVBool_tPKDhl(
357 // CPP-CHECK-NEXT: entry:
358 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]])
359 // CPP-CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 8 x half>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
360 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 8 x half> @llvm.aarch64.sve.ldnt1.nxv8f16(<vscale x 8 x i1> [[TMP0]], ptr [[TMP1]])
361 // CPP-CHECK-NEXT: ret <vscale x 8 x half> [[TMP2]]
363 svfloat16_t
test_svldnt1_vnum_f16(svbool_t pg
, const float16_t
*base
, int64_t vnum
)
365 return SVE_ACLE_FUNC(svldnt1_vnum
,_f16
,,)(pg
, base
, vnum
);
368 // CHECK-LABEL: @test_svldnt1_vnum_f32(
369 // CHECK-NEXT: entry:
370 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
371 // CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 4 x float>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
372 // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.ldnt1.nxv4f32(<vscale x 4 x i1> [[TMP0]], ptr [[TMP1]])
373 // CHECK-NEXT: ret <vscale x 4 x float> [[TMP2]]
375 // CPP-CHECK-LABEL: @_Z21test_svldnt1_vnum_f32u10__SVBool_tPKfl(
376 // CPP-CHECK-NEXT: entry:
377 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
378 // CPP-CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 4 x float>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
379 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.ldnt1.nxv4f32(<vscale x 4 x i1> [[TMP0]], ptr [[TMP1]])
380 // CPP-CHECK-NEXT: ret <vscale x 4 x float> [[TMP2]]
382 svfloat32_t
test_svldnt1_vnum_f32(svbool_t pg
, const float32_t
*base
, int64_t vnum
)
384 return SVE_ACLE_FUNC(svldnt1_vnum
,_f32
,,)(pg
, base
, vnum
);
387 // CHECK-LABEL: @test_svldnt1_vnum_f64(
388 // CHECK-NEXT: entry:
389 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
390 // CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 2 x double>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
391 // CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 2 x double> @llvm.aarch64.sve.ldnt1.nxv2f64(<vscale x 2 x i1> [[TMP0]], ptr [[TMP1]])
392 // CHECK-NEXT: ret <vscale x 2 x double> [[TMP2]]
394 // CPP-CHECK-LABEL: @_Z21test_svldnt1_vnum_f64u10__SVBool_tPKdl(
395 // CPP-CHECK-NEXT: entry:
396 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
397 // CPP-CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 2 x double>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
398 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 2 x double> @llvm.aarch64.sve.ldnt1.nxv2f64(<vscale x 2 x i1> [[TMP0]], ptr [[TMP1]])
399 // CPP-CHECK-NEXT: ret <vscale x 2 x double> [[TMP2]]
401 svfloat64_t
test_svldnt1_vnum_f64(svbool_t pg
, const float64_t
*base
, int64_t vnum
)
403 return SVE_ACLE_FUNC(svldnt1_vnum
,_f64
,,)(pg
, base
, vnum
);