1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // REQUIRES: aarch64-registered-target
4 // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu -target-feature +sve2 -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
5 // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu -target-feature +sve2 -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
6 // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2 -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
7 // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2 -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
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_svmlalb_s16(
20 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.smlalb.nxv8i16(<vscale x 8 x i16> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]], <vscale x 16 x i8> [[OP3:%.*]])
21 // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
23 // CPP-CHECK-LABEL: @_Z16test_svmlalb_s16u11__SVInt16_tu10__SVInt8_tS0_(
24 // CPP-CHECK-NEXT: entry:
25 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.smlalb.nxv8i16(<vscale x 8 x i16> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]], <vscale x 16 x i8> [[OP3:%.*]])
26 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
28 svint16_t
test_svmlalb_s16(svint16_t op1
, svint8_t op2
, svint8_t op3
)
30 return SVE_ACLE_FUNC(svmlalb
,_s16
,,)(op1
, op2
, op3
);
33 // CHECK-LABEL: @test_svmlalb_s32(
35 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.smlalb.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[OP3:%.*]])
36 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
38 // CPP-CHECK-LABEL: @_Z16test_svmlalb_s32u11__SVInt32_tu11__SVInt16_tS0_(
39 // CPP-CHECK-NEXT: entry:
40 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.smlalb.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[OP3:%.*]])
41 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
43 svint32_t
test_svmlalb_s32(svint32_t op1
, svint16_t op2
, svint16_t op3
)
45 return SVE_ACLE_FUNC(svmlalb
,_s32
,,)(op1
, op2
, op3
);
48 // CHECK-LABEL: @test_svmlalb_s64(
50 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.smlalb.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[OP3:%.*]])
51 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
53 // CPP-CHECK-LABEL: @_Z16test_svmlalb_s64u11__SVInt64_tu11__SVInt32_tS0_(
54 // CPP-CHECK-NEXT: entry:
55 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.smlalb.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[OP3:%.*]])
56 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
58 svint64_t
test_svmlalb_s64(svint64_t op1
, svint32_t op2
, svint32_t op3
)
60 return SVE_ACLE_FUNC(svmlalb
,_s64
,,)(op1
, op2
, op3
);
63 // CHECK-LABEL: @test_svmlalb_u16(
65 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.umlalb.nxv8i16(<vscale x 8 x i16> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]], <vscale x 16 x i8> [[OP3:%.*]])
66 // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
68 // CPP-CHECK-LABEL: @_Z16test_svmlalb_u16u12__SVUint16_tu11__SVUint8_tS0_(
69 // CPP-CHECK-NEXT: entry:
70 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.umlalb.nxv8i16(<vscale x 8 x i16> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]], <vscale x 16 x i8> [[OP3:%.*]])
71 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
73 svuint16_t
test_svmlalb_u16(svuint16_t op1
, svuint8_t op2
, svuint8_t op3
)
75 return SVE_ACLE_FUNC(svmlalb
,_u16
,,)(op1
, op2
, op3
);
78 // CHECK-LABEL: @test_svmlalb_u32(
80 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.umlalb.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[OP3:%.*]])
81 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
83 // CPP-CHECK-LABEL: @_Z16test_svmlalb_u32u12__SVUint32_tu12__SVUint16_tS0_(
84 // CPP-CHECK-NEXT: entry:
85 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.umlalb.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[OP3:%.*]])
86 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
88 svuint32_t
test_svmlalb_u32(svuint32_t op1
, svuint16_t op2
, svuint16_t op3
)
90 return SVE_ACLE_FUNC(svmlalb
,_u32
,,)(op1
, op2
, op3
);
93 // CHECK-LABEL: @test_svmlalb_u64(
95 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.umlalb.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[OP3:%.*]])
96 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
98 // CPP-CHECK-LABEL: @_Z16test_svmlalb_u64u12__SVUint64_tu12__SVUint32_tS0_(
99 // CPP-CHECK-NEXT: entry:
100 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.umlalb.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[OP3:%.*]])
101 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
103 svuint64_t
test_svmlalb_u64(svuint64_t op1
, svuint32_t op2
, svuint32_t op3
)
105 return SVE_ACLE_FUNC(svmlalb
,_u64
,,)(op1
, op2
, op3
);
108 // CHECK-LABEL: @test_svmlalb_n_s16(
109 // CHECK-NEXT: entry:
110 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP3:%.*]], i64 0
111 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
112 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.smlalb.nxv8i16(<vscale x 8 x i16> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]], <vscale x 16 x i8> [[DOTSPLAT]])
113 // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
115 // CPP-CHECK-LABEL: @_Z18test_svmlalb_n_s16u11__SVInt16_tu10__SVInt8_ta(
116 // CPP-CHECK-NEXT: entry:
117 // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP3:%.*]], i64 0
118 // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
119 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.smlalb.nxv8i16(<vscale x 8 x i16> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]], <vscale x 16 x i8> [[DOTSPLAT]])
120 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
122 svint16_t
test_svmlalb_n_s16(svint16_t op1
, svint8_t op2
, int8_t op3
)
124 return SVE_ACLE_FUNC(svmlalb
,_n_s16
,,)(op1
, op2
, op3
);
127 // CHECK-LABEL: @test_svmlalb_n_s32(
128 // CHECK-NEXT: entry:
129 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[OP3:%.*]], i64 0
130 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[DOTSPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
131 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.smlalb.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[DOTSPLAT]])
132 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
134 // CPP-CHECK-LABEL: @_Z18test_svmlalb_n_s32u11__SVInt32_tu11__SVInt16_ts(
135 // CPP-CHECK-NEXT: entry:
136 // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[OP3:%.*]], i64 0
137 // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[DOTSPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
138 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.smlalb.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[DOTSPLAT]])
139 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
141 svint32_t
test_svmlalb_n_s32(svint32_t op1
, svint16_t op2
, int16_t op3
)
143 return SVE_ACLE_FUNC(svmlalb
,_n_s32
,,)(op1
, op2
, op3
);
146 // CHECK-LABEL: @test_svmlalb_n_s64(
147 // CHECK-NEXT: entry:
148 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP3:%.*]], i64 0
149 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
150 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.smlalb.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[DOTSPLAT]])
151 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
153 // CPP-CHECK-LABEL: @_Z18test_svmlalb_n_s64u11__SVInt64_tu11__SVInt32_ti(
154 // CPP-CHECK-NEXT: entry:
155 // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP3:%.*]], i64 0
156 // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
157 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.smlalb.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[DOTSPLAT]])
158 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
160 svint64_t
test_svmlalb_n_s64(svint64_t op1
, svint32_t op2
, int32_t op3
)
162 return SVE_ACLE_FUNC(svmlalb
,_n_s64
,,)(op1
, op2
, op3
);
165 // CHECK-LABEL: @test_svmlalb_n_u16(
166 // CHECK-NEXT: entry:
167 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP3:%.*]], i64 0
168 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
169 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.umlalb.nxv8i16(<vscale x 8 x i16> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]], <vscale x 16 x i8> [[DOTSPLAT]])
170 // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
172 // CPP-CHECK-LABEL: @_Z18test_svmlalb_n_u16u12__SVUint16_tu11__SVUint8_th(
173 // CPP-CHECK-NEXT: entry:
174 // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP3:%.*]], i64 0
175 // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
176 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.umlalb.nxv8i16(<vscale x 8 x i16> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]], <vscale x 16 x i8> [[DOTSPLAT]])
177 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
179 svuint16_t
test_svmlalb_n_u16(svuint16_t op1
, svuint8_t op2
, uint8_t op3
)
181 return SVE_ACLE_FUNC(svmlalb
,_n_u16
,,)(op1
, op2
, op3
);
184 // CHECK-LABEL: @test_svmlalb_n_u32(
185 // CHECK-NEXT: entry:
186 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[OP3:%.*]], i64 0
187 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[DOTSPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
188 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.umlalb.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[DOTSPLAT]])
189 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
191 // CPP-CHECK-LABEL: @_Z18test_svmlalb_n_u32u12__SVUint32_tu12__SVUint16_tt(
192 // CPP-CHECK-NEXT: entry:
193 // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[OP3:%.*]], i64 0
194 // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[DOTSPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
195 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.umlalb.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[DOTSPLAT]])
196 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
198 svuint32_t
test_svmlalb_n_u32(svuint32_t op1
, svuint16_t op2
, uint16_t op3
)
200 return SVE_ACLE_FUNC(svmlalb
,_n_u32
,,)(op1
, op2
, op3
);
203 // CHECK-LABEL: @test_svmlalb_n_u64(
204 // CHECK-NEXT: entry:
205 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP3:%.*]], i64 0
206 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
207 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.umlalb.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[DOTSPLAT]])
208 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
210 // CPP-CHECK-LABEL: @_Z18test_svmlalb_n_u64u12__SVUint64_tu12__SVUint32_tj(
211 // CPP-CHECK-NEXT: entry:
212 // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP3:%.*]], i64 0
213 // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
214 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.umlalb.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[DOTSPLAT]])
215 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
217 svuint64_t
test_svmlalb_n_u64(svuint64_t op1
, svuint32_t op2
, uint32_t op3
)
219 return SVE_ACLE_FUNC(svmlalb
,_n_u64
,,)(op1
, op2
, op3
);
222 // CHECK-LABEL: @test_svmlalb_lane_s32(
223 // CHECK-NEXT: entry:
224 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.smlalb.lane.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[OP3:%.*]], i32 0)
225 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
227 // CPP-CHECK-LABEL: @_Z21test_svmlalb_lane_s32u11__SVInt32_tu11__SVInt16_tS0_(
228 // CPP-CHECK-NEXT: entry:
229 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.smlalb.lane.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[OP3:%.*]], i32 0)
230 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
232 svint32_t
test_svmlalb_lane_s32(svint32_t op1
, svint16_t op2
, svint16_t op3
)
234 return SVE_ACLE_FUNC(svmlalb_lane
,_s32
,,)(op1
, op2
, op3
, 0);
237 // CHECK-LABEL: @test_svmlalb_lane_s32_1(
238 // CHECK-NEXT: entry:
239 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.smlalb.lane.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[OP3:%.*]], i32 7)
240 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
242 // CPP-CHECK-LABEL: @_Z23test_svmlalb_lane_s32_1u11__SVInt32_tu11__SVInt16_tS0_(
243 // CPP-CHECK-NEXT: entry:
244 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.smlalb.lane.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[OP3:%.*]], i32 7)
245 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
247 svint32_t
test_svmlalb_lane_s32_1(svint32_t op1
, svint16_t op2
, svint16_t op3
)
249 return SVE_ACLE_FUNC(svmlalb_lane
,_s32
,,)(op1
, op2
, op3
, 7);
252 // CHECK-LABEL: @test_svmlalb_lane_s64(
253 // CHECK-NEXT: entry:
254 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.smlalb.lane.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[OP3:%.*]], i32 0)
255 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
257 // CPP-CHECK-LABEL: @_Z21test_svmlalb_lane_s64u11__SVInt64_tu11__SVInt32_tS0_(
258 // CPP-CHECK-NEXT: entry:
259 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.smlalb.lane.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[OP3:%.*]], i32 0)
260 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
262 svint64_t
test_svmlalb_lane_s64(svint64_t op1
, svint32_t op2
, svint32_t op3
)
264 return SVE_ACLE_FUNC(svmlalb_lane
,_s64
,,)(op1
, op2
, op3
, 0);
267 // CHECK-LABEL: @test_svmlalb_lane_s64_1(
268 // CHECK-NEXT: entry:
269 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.smlalb.lane.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[OP3:%.*]], i32 3)
270 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
272 // CPP-CHECK-LABEL: @_Z23test_svmlalb_lane_s64_1u11__SVInt64_tu11__SVInt32_tS0_(
273 // CPP-CHECK-NEXT: entry:
274 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.smlalb.lane.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[OP3:%.*]], i32 3)
275 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
277 svint64_t
test_svmlalb_lane_s64_1(svint64_t op1
, svint32_t op2
, svint32_t op3
)
279 return SVE_ACLE_FUNC(svmlalb_lane
,_s64
,,)(op1
, op2
, op3
, 3);
282 // CHECK-LABEL: @test_svmlalb_lane_u32(
283 // CHECK-NEXT: entry:
284 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.umlalb.lane.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[OP3:%.*]], i32 0)
285 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
287 // CPP-CHECK-LABEL: @_Z21test_svmlalb_lane_u32u12__SVUint32_tu12__SVUint16_tS0_(
288 // CPP-CHECK-NEXT: entry:
289 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.umlalb.lane.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[OP3:%.*]], i32 0)
290 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
292 svuint32_t
test_svmlalb_lane_u32(svuint32_t op1
, svuint16_t op2
, svuint16_t op3
)
294 return SVE_ACLE_FUNC(svmlalb_lane
,_u32
,,)(op1
, op2
, op3
, 0);
297 // CHECK-LABEL: @test_svmlalb_lane_u32_1(
298 // CHECK-NEXT: entry:
299 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.umlalb.lane.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[OP3:%.*]], i32 7)
300 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
302 // CPP-CHECK-LABEL: @_Z23test_svmlalb_lane_u32_1u12__SVUint32_tu12__SVUint16_tS0_(
303 // CPP-CHECK-NEXT: entry:
304 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.umlalb.lane.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 8 x i16> [[OP2:%.*]], <vscale x 8 x i16> [[OP3:%.*]], i32 7)
305 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
307 svuint32_t
test_svmlalb_lane_u32_1(svuint32_t op1
, svuint16_t op2
, svuint16_t op3
)
309 return SVE_ACLE_FUNC(svmlalb_lane
,_u32
,,)(op1
, op2
, op3
, 7);
312 // CHECK-LABEL: @test_svmlalb_lane_u64(
313 // CHECK-NEXT: entry:
314 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.umlalb.lane.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[OP3:%.*]], i32 0)
315 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
317 // CPP-CHECK-LABEL: @_Z21test_svmlalb_lane_u64u12__SVUint64_tu12__SVUint32_tS0_(
318 // CPP-CHECK-NEXT: entry:
319 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.umlalb.lane.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[OP3:%.*]], i32 0)
320 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
322 svuint64_t
test_svmlalb_lane_u64(svuint64_t op1
, svuint32_t op2
, svuint32_t op3
)
324 return SVE_ACLE_FUNC(svmlalb_lane
,_u64
,,)(op1
, op2
, op3
, 0);
327 // CHECK-LABEL: @test_svmlalb_lane_u64_1(
328 // CHECK-NEXT: entry:
329 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.umlalb.lane.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[OP3:%.*]], i32 3)
330 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
332 // CPP-CHECK-LABEL: @_Z23test_svmlalb_lane_u64_1u12__SVUint64_tu12__SVUint32_tS0_(
333 // CPP-CHECK-NEXT: entry:
334 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.umlalb.lane.nxv2i64(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]], <vscale x 4 x i32> [[OP3:%.*]], i32 3)
335 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
337 svuint64_t
test_svmlalb_lane_u64_1(svuint64_t op1
, svuint32_t op2
, svuint32_t op3
)
339 return SVE_ACLE_FUNC(svmlalb_lane
,_u64
,,)(op1
, op2
, op3
, 3);
342 // CHECK-LABEL: @test_svmlalb_f32(
343 // CHECK-NEXT: entry:
344 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.fmlalb.nxv4f32(<vscale x 4 x float> [[OP1:%.*]], <vscale x 8 x half> [[OP2:%.*]], <vscale x 8 x half> [[OP3:%.*]])
345 // CHECK-NEXT: ret <vscale x 4 x float> [[TMP0]]
347 // CPP-CHECK-LABEL: @_Z16test_svmlalb_f32u13__SVFloat32_tu13__SVFloat16_tS0_(
348 // CPP-CHECK-NEXT: entry:
349 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.fmlalb.nxv4f32(<vscale x 4 x float> [[OP1:%.*]], <vscale x 8 x half> [[OP2:%.*]], <vscale x 8 x half> [[OP3:%.*]])
350 // CPP-CHECK-NEXT: ret <vscale x 4 x float> [[TMP0]]
352 svfloat32_t
test_svmlalb_f32(svfloat32_t op1
, svfloat16_t op2
, svfloat16_t op3
)
354 return SVE_ACLE_FUNC(svmlalb
,_f32
,,)(op1
, op2
, op3
);
357 // CHECK-LABEL: @test_svmlalb_n_f32(
358 // CHECK-NEXT: entry:
359 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 8 x half> poison, half [[OP3:%.*]], i64 0
360 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 8 x half> [[DOTSPLATINSERT]], <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
361 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.fmlalb.nxv4f32(<vscale x 4 x float> [[OP1:%.*]], <vscale x 8 x half> [[OP2:%.*]], <vscale x 8 x half> [[DOTSPLAT]])
362 // CHECK-NEXT: ret <vscale x 4 x float> [[TMP0]]
364 // CPP-CHECK-LABEL: @_Z18test_svmlalb_n_f32u13__SVFloat32_tu13__SVFloat16_tDh(
365 // CPP-CHECK-NEXT: entry:
366 // CPP-CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 8 x half> poison, half [[OP3:%.*]], i64 0
367 // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 8 x half> [[DOTSPLATINSERT]], <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
368 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.fmlalb.nxv4f32(<vscale x 4 x float> [[OP1:%.*]], <vscale x 8 x half> [[OP2:%.*]], <vscale x 8 x half> [[DOTSPLAT]])
369 // CPP-CHECK-NEXT: ret <vscale x 4 x float> [[TMP0]]
371 svfloat32_t
test_svmlalb_n_f32(svfloat32_t op1
, svfloat16_t op2
, float16_t op3
)
373 return SVE_ACLE_FUNC(svmlalb
,_n_f32
,,)(op1
, op2
, op3
);
376 // CHECK-LABEL: @test_svmlalb_lane_f32(
377 // CHECK-NEXT: entry:
378 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.fmlalb.lane.nxv4f32(<vscale x 4 x float> [[OP1:%.*]], <vscale x 8 x half> [[OP2:%.*]], <vscale x 8 x half> [[OP3:%.*]], i32 0)
379 // CHECK-NEXT: ret <vscale x 4 x float> [[TMP0]]
381 // CPP-CHECK-LABEL: @_Z21test_svmlalb_lane_f32u13__SVFloat32_tu13__SVFloat16_tS0_(
382 // CPP-CHECK-NEXT: entry:
383 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.fmlalb.lane.nxv4f32(<vscale x 4 x float> [[OP1:%.*]], <vscale x 8 x half> [[OP2:%.*]], <vscale x 8 x half> [[OP3:%.*]], i32 0)
384 // CPP-CHECK-NEXT: ret <vscale x 4 x float> [[TMP0]]
386 svfloat32_t
test_svmlalb_lane_f32(svfloat32_t op1
, svfloat16_t op2
, svfloat16_t op3
)
388 return SVE_ACLE_FUNC(svmlalb_lane
,_f32
,,)(op1
, op2
, op3
, 0);
391 // CHECK-LABEL: @test_svmlalb_lane_f32_1(
392 // CHECK-NEXT: entry:
393 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.fmlalb.lane.nxv4f32(<vscale x 4 x float> [[OP1:%.*]], <vscale x 8 x half> [[OP2:%.*]], <vscale x 8 x half> [[OP3:%.*]], i32 7)
394 // CHECK-NEXT: ret <vscale x 4 x float> [[TMP0]]
396 // CPP-CHECK-LABEL: @_Z23test_svmlalb_lane_f32_1u13__SVFloat32_tu13__SVFloat16_tS0_(
397 // CPP-CHECK-NEXT: entry:
398 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.fmlalb.lane.nxv4f32(<vscale x 4 x float> [[OP1:%.*]], <vscale x 8 x half> [[OP2:%.*]], <vscale x 8 x half> [[OP3:%.*]], i32 7)
399 // CPP-CHECK-NEXT: ret <vscale x 4 x float> [[TMP0]]
401 svfloat32_t
test_svmlalb_lane_f32_1(svfloat32_t op1
, svfloat16_t op2
, svfloat16_t op3
)
403 return SVE_ACLE_FUNC(svmlalb_lane
,_f32
,,)(op1
, op2
, op3
, 7);