xref: /llvm-project/clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_create3.c (revision 207e5ccceec8d3cc3f32723e78f2a142bc61b07d)
1*207e5cccSFangrui Song // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2*207e5cccSFangrui Song // REQUIRES: aarch64-registered-target
3*207e5cccSFangrui Song // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
4*207e5cccSFangrui Song // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
5*207e5cccSFangrui Song // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
6*207e5cccSFangrui Song // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
7*207e5cccSFangrui Song // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
8*207e5cccSFangrui Song // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
9*207e5cccSFangrui Song 
10*207e5cccSFangrui Song #include <arm_sve.h>
11*207e5cccSFangrui Song 
12*207e5cccSFangrui Song #ifdef SVE_OVERLOADED_FORMS
13*207e5cccSFangrui Song // A simple used,unused... macro, long enough to represent any SVE builtin.
14*207e5cccSFangrui Song #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
15*207e5cccSFangrui Song #else
16*207e5cccSFangrui Song #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
17*207e5cccSFangrui Song #endif
18*207e5cccSFangrui Song 
19*207e5cccSFangrui Song #ifdef __ARM_FEATURE_SME
20*207e5cccSFangrui Song #define ATTR __arm_streaming
21*207e5cccSFangrui Song #else
22*207e5cccSFangrui Song #define ATTR
23*207e5cccSFangrui Song #endif
24*207e5cccSFangrui Song 
25*207e5cccSFangrui Song // CHECK-LABEL: @test_svcreate3_s8(
26*207e5cccSFangrui Song // CHECK-NEXT:  entry:
27*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } poison, <vscale x 16 x i8> [[X0:%.*]], 0
28*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } [[TMP0]], <vscale x 16 x i8> [[X1:%.*]], 1
29*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } [[TMP1]], <vscale x 16 x i8> [[X2:%.*]], 2
30*207e5cccSFangrui Song // CHECK-NEXT:    ret { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } [[TMP2]]
31*207e5cccSFangrui Song //
32*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svcreate3_s8u10__SVInt8_tS_S_(
33*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
34*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } poison, <vscale x 16 x i8> [[X0:%.*]], 0
35*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } [[TMP0]], <vscale x 16 x i8> [[X1:%.*]], 1
36*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } [[TMP1]], <vscale x 16 x i8> [[X2:%.*]], 2
37*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } [[TMP2]]
38*207e5cccSFangrui Song //
39*207e5cccSFangrui Song svint8x3_t test_svcreate3_s8(svint8_t x0, svint8_t x1, svint8_t x2) ATTR
40*207e5cccSFangrui Song {
41*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svcreate3,_s8,,)(x0, x1, x2);
42*207e5cccSFangrui Song }
43*207e5cccSFangrui Song 
44*207e5cccSFangrui Song // CHECK-LABEL: @test_svcreate3_s16(
45*207e5cccSFangrui Song // CHECK-NEXT:  entry:
46*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } poison, <vscale x 8 x i16> [[X0:%.*]], 0
47*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } [[TMP0]], <vscale x 8 x i16> [[X1:%.*]], 1
48*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } [[TMP1]], <vscale x 8 x i16> [[X2:%.*]], 2
49*207e5cccSFangrui Song // CHECK-NEXT:    ret { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } [[TMP2]]
50*207e5cccSFangrui Song //
51*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svcreate3_s16u11__SVInt16_tS_S_(
52*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
53*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } poison, <vscale x 8 x i16> [[X0:%.*]], 0
54*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } [[TMP0]], <vscale x 8 x i16> [[X1:%.*]], 1
55*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } [[TMP1]], <vscale x 8 x i16> [[X2:%.*]], 2
56*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } [[TMP2]]
57*207e5cccSFangrui Song //
58*207e5cccSFangrui Song svint16x3_t test_svcreate3_s16(svint16_t x0, svint16_t x1, svint16_t x2) ATTR
59*207e5cccSFangrui Song {
60*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svcreate3,_s16,,)(x0, x1, x2);
61*207e5cccSFangrui Song }
62*207e5cccSFangrui Song 
63*207e5cccSFangrui Song // CHECK-LABEL: @test_svcreate3_s32(
64*207e5cccSFangrui Song // CHECK-NEXT:  entry:
65*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } poison, <vscale x 4 x i32> [[X0:%.*]], 0
66*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } [[TMP0]], <vscale x 4 x i32> [[X1:%.*]], 1
67*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } [[TMP1]], <vscale x 4 x i32> [[X2:%.*]], 2
68*207e5cccSFangrui Song // CHECK-NEXT:    ret { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } [[TMP2]]
69*207e5cccSFangrui Song //
70*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svcreate3_s32u11__SVInt32_tS_S_(
71*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
72*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } poison, <vscale x 4 x i32> [[X0:%.*]], 0
73*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } [[TMP0]], <vscale x 4 x i32> [[X1:%.*]], 1
74*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } [[TMP1]], <vscale x 4 x i32> [[X2:%.*]], 2
75*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } [[TMP2]]
76*207e5cccSFangrui Song //
77*207e5cccSFangrui Song svint32x3_t test_svcreate3_s32(svint32_t x0, svint32_t x1, svint32_t x2) ATTR
78*207e5cccSFangrui Song {
79*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svcreate3,_s32,,)(x0, x1, x2);
80*207e5cccSFangrui Song }
81*207e5cccSFangrui Song 
82*207e5cccSFangrui Song // CHECK-LABEL: @test_svcreate3_s64(
83*207e5cccSFangrui Song // CHECK-NEXT:  entry:
84*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } poison, <vscale x 2 x i64> [[X0:%.*]], 0
85*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } [[TMP0]], <vscale x 2 x i64> [[X1:%.*]], 1
86*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } [[TMP1]], <vscale x 2 x i64> [[X2:%.*]], 2
87*207e5cccSFangrui Song // CHECK-NEXT:    ret { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } [[TMP2]]
88*207e5cccSFangrui Song //
89*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svcreate3_s64u11__SVInt64_tS_S_(
90*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
91*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } poison, <vscale x 2 x i64> [[X0:%.*]], 0
92*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } [[TMP0]], <vscale x 2 x i64> [[X1:%.*]], 1
93*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } [[TMP1]], <vscale x 2 x i64> [[X2:%.*]], 2
94*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } [[TMP2]]
95*207e5cccSFangrui Song //
96*207e5cccSFangrui Song svint64x3_t test_svcreate3_s64(svint64_t x0, svint64_t x1, svint64_t x2) ATTR
97*207e5cccSFangrui Song {
98*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svcreate3,_s64,,)(x0, x1, x2);
99*207e5cccSFangrui Song }
100*207e5cccSFangrui Song 
101*207e5cccSFangrui Song // CHECK-LABEL: @test_svcreate3_u8(
102*207e5cccSFangrui Song // CHECK-NEXT:  entry:
103*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } poison, <vscale x 16 x i8> [[X0:%.*]], 0
104*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } [[TMP0]], <vscale x 16 x i8> [[X1:%.*]], 1
105*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } [[TMP1]], <vscale x 16 x i8> [[X2:%.*]], 2
106*207e5cccSFangrui Song // CHECK-NEXT:    ret { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } [[TMP2]]
107*207e5cccSFangrui Song //
108*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z17test_svcreate3_u8u11__SVUint8_tS_S_(
109*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
110*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } poison, <vscale x 16 x i8> [[X0:%.*]], 0
111*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } [[TMP0]], <vscale x 16 x i8> [[X1:%.*]], 1
112*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } [[TMP1]], <vscale x 16 x i8> [[X2:%.*]], 2
113*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } [[TMP2]]
114*207e5cccSFangrui Song //
115*207e5cccSFangrui Song svuint8x3_t test_svcreate3_u8(svuint8_t x0, svuint8_t x1, svuint8_t x2) ATTR
116*207e5cccSFangrui Song {
117*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svcreate3,_u8,,)(x0, x1, x2);
118*207e5cccSFangrui Song }
119*207e5cccSFangrui Song 
120*207e5cccSFangrui Song // CHECK-LABEL: @test_svcreate3_u16(
121*207e5cccSFangrui Song // CHECK-NEXT:  entry:
122*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } poison, <vscale x 8 x i16> [[X0:%.*]], 0
123*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } [[TMP0]], <vscale x 8 x i16> [[X1:%.*]], 1
124*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } [[TMP1]], <vscale x 8 x i16> [[X2:%.*]], 2
125*207e5cccSFangrui Song // CHECK-NEXT:    ret { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } [[TMP2]]
126*207e5cccSFangrui Song //
127*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svcreate3_u16u12__SVUint16_tS_S_(
128*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
129*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } poison, <vscale x 8 x i16> [[X0:%.*]], 0
130*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } [[TMP0]], <vscale x 8 x i16> [[X1:%.*]], 1
131*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } [[TMP1]], <vscale x 8 x i16> [[X2:%.*]], 2
132*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } [[TMP2]]
133*207e5cccSFangrui Song //
134*207e5cccSFangrui Song svuint16x3_t test_svcreate3_u16(svuint16_t x0, svuint16_t x1, svuint16_t x2) ATTR
135*207e5cccSFangrui Song {
136*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svcreate3,_u16,,)(x0, x1, x2);
137*207e5cccSFangrui Song }
138*207e5cccSFangrui Song 
139*207e5cccSFangrui Song // CHECK-LABEL: @test_svcreate3_u32(
140*207e5cccSFangrui Song // CHECK-NEXT:  entry:
141*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } poison, <vscale x 4 x i32> [[X0:%.*]], 0
142*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } [[TMP0]], <vscale x 4 x i32> [[X1:%.*]], 1
143*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } [[TMP1]], <vscale x 4 x i32> [[X2:%.*]], 2
144*207e5cccSFangrui Song // CHECK-NEXT:    ret { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } [[TMP2]]
145*207e5cccSFangrui Song //
146*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svcreate3_u32u12__SVUint32_tS_S_(
147*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
148*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } poison, <vscale x 4 x i32> [[X0:%.*]], 0
149*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } [[TMP0]], <vscale x 4 x i32> [[X1:%.*]], 1
150*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } [[TMP1]], <vscale x 4 x i32> [[X2:%.*]], 2
151*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } [[TMP2]]
152*207e5cccSFangrui Song //
153*207e5cccSFangrui Song svuint32x3_t test_svcreate3_u32(svuint32_t x0, svuint32_t x1, svuint32_t x2) ATTR
154*207e5cccSFangrui Song {
155*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svcreate3,_u32,,)(x0, x1, x2);
156*207e5cccSFangrui Song }
157*207e5cccSFangrui Song 
158*207e5cccSFangrui Song // CHECK-LABEL: @test_svcreate3_u64(
159*207e5cccSFangrui Song // CHECK-NEXT:  entry:
160*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } poison, <vscale x 2 x i64> [[X0:%.*]], 0
161*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } [[TMP0]], <vscale x 2 x i64> [[X1:%.*]], 1
162*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } [[TMP1]], <vscale x 2 x i64> [[X2:%.*]], 2
163*207e5cccSFangrui Song // CHECK-NEXT:    ret { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } [[TMP2]]
164*207e5cccSFangrui Song //
165*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svcreate3_u64u12__SVUint64_tS_S_(
166*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
167*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } poison, <vscale x 2 x i64> [[X0:%.*]], 0
168*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } [[TMP0]], <vscale x 2 x i64> [[X1:%.*]], 1
169*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } [[TMP1]], <vscale x 2 x i64> [[X2:%.*]], 2
170*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } [[TMP2]]
171*207e5cccSFangrui Song //
172*207e5cccSFangrui Song svuint64x3_t test_svcreate3_u64(svuint64_t x0, svuint64_t x1, svuint64_t x2) ATTR
173*207e5cccSFangrui Song {
174*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svcreate3,_u64,,)(x0, x1, x2);
175*207e5cccSFangrui Song }
176*207e5cccSFangrui Song 
177*207e5cccSFangrui Song // CHECK-LABEL: @test_svcreate3_f16(
178*207e5cccSFangrui Song // CHECK-NEXT:  entry:
179*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } poison, <vscale x 8 x half> [[X0:%.*]], 0
180*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } [[TMP0]], <vscale x 8 x half> [[X1:%.*]], 1
181*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } [[TMP1]], <vscale x 8 x half> [[X2:%.*]], 2
182*207e5cccSFangrui Song // CHECK-NEXT:    ret { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } [[TMP2]]
183*207e5cccSFangrui Song //
184*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svcreate3_f16u13__SVFloat16_tS_S_(
185*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
186*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } poison, <vscale x 8 x half> [[X0:%.*]], 0
187*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } [[TMP0]], <vscale x 8 x half> [[X1:%.*]], 1
188*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } [[TMP1]], <vscale x 8 x half> [[X2:%.*]], 2
189*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } [[TMP2]]
190*207e5cccSFangrui Song //
191*207e5cccSFangrui Song svfloat16x3_t test_svcreate3_f16(svfloat16_t x0, svfloat16_t x1, svfloat16_t x2) ATTR
192*207e5cccSFangrui Song {
193*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svcreate3,_f16,,)(x0, x1, x2);
194*207e5cccSFangrui Song }
195*207e5cccSFangrui Song 
196*207e5cccSFangrui Song // CHECK-LABEL: @test_svcreate3_f32(
197*207e5cccSFangrui Song // CHECK-NEXT:  entry:
198*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } poison, <vscale x 4 x float> [[X0:%.*]], 0
199*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } [[TMP0]], <vscale x 4 x float> [[X1:%.*]], 1
200*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } [[TMP1]], <vscale x 4 x float> [[X2:%.*]], 2
201*207e5cccSFangrui Song // CHECK-NEXT:    ret { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } [[TMP2]]
202*207e5cccSFangrui Song //
203*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svcreate3_f32u13__SVFloat32_tS_S_(
204*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
205*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } poison, <vscale x 4 x float> [[X0:%.*]], 0
206*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } [[TMP0]], <vscale x 4 x float> [[X1:%.*]], 1
207*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } [[TMP1]], <vscale x 4 x float> [[X2:%.*]], 2
208*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } [[TMP2]]
209*207e5cccSFangrui Song //
210*207e5cccSFangrui Song svfloat32x3_t test_svcreate3_f32(svfloat32_t x0, svfloat32_t x1, svfloat32_t x2) ATTR
211*207e5cccSFangrui Song {
212*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svcreate3,_f32,,)(x0, x1, x2);
213*207e5cccSFangrui Song }
214*207e5cccSFangrui Song 
215*207e5cccSFangrui Song // CHECK-LABEL: @test_svcreate3_f64(
216*207e5cccSFangrui Song // CHECK-NEXT:  entry:
217*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } poison, <vscale x 2 x double> [[X0:%.*]], 0
218*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } [[TMP0]], <vscale x 2 x double> [[X1:%.*]], 1
219*207e5cccSFangrui Song // CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } [[TMP1]], <vscale x 2 x double> [[X2:%.*]], 2
220*207e5cccSFangrui Song // CHECK-NEXT:    ret { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } [[TMP2]]
221*207e5cccSFangrui Song //
222*207e5cccSFangrui Song // CPP-CHECK-LABEL: @_Z18test_svcreate3_f64u13__SVFloat64_tS_S_(
223*207e5cccSFangrui Song // CPP-CHECK-NEXT:  entry:
224*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP0:%.*]] = insertvalue { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } poison, <vscale x 2 x double> [[X0:%.*]], 0
225*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP1:%.*]] = insertvalue { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } [[TMP0]], <vscale x 2 x double> [[X1:%.*]], 1
226*207e5cccSFangrui Song // CPP-CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } [[TMP1]], <vscale x 2 x double> [[X2:%.*]], 2
227*207e5cccSFangrui Song // CPP-CHECK-NEXT:    ret { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } [[TMP2]]
228*207e5cccSFangrui Song //
229*207e5cccSFangrui Song svfloat64x3_t test_svcreate3_f64(svfloat64_t x0, svfloat64_t x1, svfloat64_t x2) ATTR
230*207e5cccSFangrui Song {
231*207e5cccSFangrui Song   return SVE_ACLE_FUNC(svcreate3,_f64,,)(x0, x1, x2);
232*207e5cccSFangrui Song }
233