Skip to content

Commit ca1ec79

Browse files
Jenkinsronlieb
authored andcommitted
merge main into amd-staging
Revert "[libc++abi] Improve error message when libunwind is missing from LLVM_ENABLE_RUNTIMES (llvm#77991)" Change-Id: Ie6dcb219cff4beac5b6cf6d9fafc5757cc7a08e3
2 parents 622be37 + d0708e6 commit ca1ec79

File tree

173 files changed

+6355
-5708
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+6355
-5708
lines changed

clang/include/clang/Basic/DiagnosticCommonKinds.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,9 @@ def err_cannot_open_file : Error<"cannot open file '%0': %1">, DefaultFatal;
358358
def err_file_modified : Error<
359359
"file '%0' modified since it was first processed">, DefaultFatal;
360360
def err_file_too_large : Error<
361-
"sorry, unsupported: file '%0' is too large for Clang to process">;
361+
"file '%0' is too large for Clang to process">;
362362
def err_sloc_space_too_large : Error<
363-
"sorry, the translation unit is too large for Clang to process: ran out of source locations">, DefaultFatal;
363+
"translation unit is too large for Clang to process: ran out of source locations">, DefaultFatal;
364364
def err_unsupported_bom : Error<"%0 byte order mark detected in '%1', but "
365365
"encoding is not supported">, DefaultFatal;
366366
def err_unable_to_rename_temp : Error<

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5145,7 +5145,7 @@ def err_non_type_template_arg_subobject : Error<
51455145
def err_non_type_template_arg_addr_label_diff : Error<
51465146
"template argument / label address difference / what did you expect?">;
51475147
def err_non_type_template_arg_unsupported : Error<
5148-
"sorry, non-type template argument of type %0 is not yet supported">;
5148+
"non-type template argument of type %0 is not yet supported">;
51495149
def err_template_arg_not_convertible : Error<
51505150
"non-type template argument of type %0 cannot be converted to a value "
51515151
"of type %1">;
@@ -5198,7 +5198,7 @@ def err_template_arg_not_object_or_func : Error<
51985198
def err_template_arg_not_pointer_to_member_form : Error<
51995199
"non-type template argument is not a pointer to member constant">;
52005200
def err_template_arg_member_ptr_base_derived_not_supported : Error<
5201-
"sorry, non-type template argument of pointer-to-member type %1 that refers "
5201+
"non-type template argument of pointer-to-member type %1 that refers "
52025202
"to member %q0 of a different class is not supported yet">;
52035203
def err_template_arg_invalid : Error<
52045204
"non-type template argument '%0' is invalid">;
@@ -9932,10 +9932,10 @@ def warn_new_dangling_initializer_list : Warning<
99329932
"will be destroyed at the end of the full-expression">,
99339933
InGroup<DanglingInitializerList>;
99349934
def warn_unsupported_lifetime_extension : Warning<
9935-
"sorry, lifetime extension of "
9935+
"lifetime extension of "
99369936
"%select{temporary|backing array of initializer list}0 created "
9937-
"by aggregate initialization using default member initializer "
9938-
"is not supported; lifetime of %select{temporary|backing array}0 "
9937+
"by aggregate initialization using a default member initializer "
9938+
"is not yet supported; lifetime of %select{temporary|backing array}0 "
99399939
"will end at the end of the full-expression">, InGroup<Dangling>;
99409940

99419941
// For non-floating point, expressions of the form x == x or x != x

clang/include/clang/Basic/arm_sve.td

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,9 +1296,9 @@ def SVCREATE_3_BF16 : SInst<"svcreate3[_{d}]", "3ddd", "b", MergeNone, "", [IsT
12961296
def SVCREATE_4_BF16 : SInst<"svcreate4[_{d}]", "4dddd", "b", MergeNone, "", [IsTupleCreate]>;
12971297
}
12981298

1299-
let TargetGuard = "sve2p1" in {
1300-
def SVCREATE_2_B : SInst<"svcreate2[_{d}]", "2dd", "Pc", MergeNone, "", [IsTupleCreate]>;
1301-
def SVCREATE_4_B : SInst<"svcreate4[_{d}]", "4dddd", "Pc", MergeNone, "", [IsTupleCreate]>;
1299+
let TargetGuard = "sve2p1|sme2" in {
1300+
def SVCREATE_2_B : SInst<"svcreate2[_b]", "2dd", "Pc", MergeNone, "", [IsTupleCreate, IsStreamingCompatible]>;
1301+
def SVCREATE_4_B : SInst<"svcreate4[_b]", "4dddd", "Pc", MergeNone, "", [IsTupleCreate, IsStreamingCompatible]>;
13021302
}
13031303

13041304
////////////////////////////////////////////////////////////////////////////////
@@ -1321,12 +1321,17 @@ def SVSET_3_BF16 : SInst<"svset3[_{d}]", "33id", "b", MergeNone, "", [IsTupleSet
13211321
def SVSET_4_BF16 : SInst<"svset4[_{d}]", "44id", "b", MergeNone, "", [IsTupleSet], [ImmCheck<1, ImmCheck0_3>]>;
13221322
}
13231323

1324-
let TargetGuard = "sve2p1" in {
1325-
def SVGET_2_B : SInst<"svget2[_{d}]", "d2i", "Pc", MergeNone, "", [IsTupleGet], [ImmCheck<1, ImmCheck0_1>]>;
1326-
def SVGET_4_B : SInst<"svget4[_{d}]", "d4i", "Pc", MergeNone, "", [IsTupleGet], [ImmCheck<1, ImmCheck0_3>]>;
1324+
let TargetGuard = "sve2p1|sme2" in {
1325+
def SVGET_2_B : SInst<"svget2[_b]", "d2i", "Pc", MergeNone, "", [IsTupleGet, IsStreamingCompatible], [ImmCheck<1, ImmCheck0_1>]>;
1326+
def SVGET_4_B : SInst<"svget4[_b]", "d4i", "Pc", MergeNone, "", [IsTupleGet, IsStreamingCompatible], [ImmCheck<1, ImmCheck0_3>]>;
13271327

1328-
def SVSET_2_B : SInst<"svset2[_{d}]", "22id", "Pc", MergeNone, "", [IsTupleSet], [ImmCheck<1, ImmCheck0_1>]>;
1329-
def SVSET_4_B : SInst<"svset4[_{d}]", "44id", "Pc", MergeNone, "", [IsTupleSet], [ImmCheck<1, ImmCheck0_3>]>;
1328+
def SVSET_2_B : SInst<"svset2[_b]", "22id", "Pc", MergeNone, "", [IsTupleSet, IsStreamingCompatible], [ImmCheck<1, ImmCheck0_1>]>;
1329+
def SVSET_4_B : SInst<"svset4[_b]", "44id", "Pc", MergeNone, "", [IsTupleSet, IsStreamingCompatible], [ImmCheck<1, ImmCheck0_3>]>;
1330+
}
1331+
1332+
let TargetGuard = "sve2p1|sme2" in {
1333+
def SVUNDEF_2_B: Inst<"svundef2_b", "2", "Pc", MergeNone, "", [IsUndef, IsStreamingCompatible], []>;
1334+
def SVUNDEF_4_B: Inst<"svundef4_b", "4", "Pc", MergeNone, "", [IsUndef, IsStreamingCompatible], []>;
13301335
}
13311336
////////////////////////////////////////////////////////////////////////////////
13321337
// SVE2 WhileGE/GT

clang/lib/AST/Interp/ByteCodeExprGen.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2768,7 +2768,8 @@ bool ByteCodeExprGen<Emitter>::VisitUnaryOperator(const UnaryOperator *E) {
27682768
return false;
27692769
return DiscardResult ? this->emitPop(*T, E) : this->emitComp(*T, E);
27702770
case UO_Real: { // __real x
2771-
assert(!T);
2771+
if (T)
2772+
return this->delegate(SubExpr);
27722773
if (!this->visit(SubExpr))
27732774
return false;
27742775
if (!this->emitConstUint8(0, E))
@@ -2783,7 +2784,11 @@ bool ByteCodeExprGen<Emitter>::VisitUnaryOperator(const UnaryOperator *E) {
27832784
return true;
27842785
}
27852786
case UO_Imag: { // __imag x
2786-
assert(!T);
2787+
if (T) {
2788+
if (!this->discard(SubExpr))
2789+
return false;
2790+
return this->visitZeroInitializer(*T, SubExpr->getType(), SubExpr);
2791+
}
27872792
if (!this->visit(SubExpr))
27882793
return false;
27892794
if (!this->emitConstUint8(1, E))

clang/lib/CodeGen/CGCleanup.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ struct EHPersonality {
613613
static const EHPersonality MSVC_CxxFrameHandler3;
614614
static const EHPersonality GNU_Wasm_CPlusPlus;
615615
static const EHPersonality XL_CPlusPlus;
616+
static const EHPersonality ZOS_CPlusPlus;
616617

617618
/// Does this personality use landingpads or the family of pad instructions
618619
/// designed to form funclets?

clang/lib/CodeGen/CGException.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ const EHPersonality
127127
EHPersonality::GNU_Wasm_CPlusPlus = { "__gxx_wasm_personality_v0", nullptr };
128128
const EHPersonality EHPersonality::XL_CPlusPlus = {"__xlcxx_personality_v1",
129129
nullptr};
130+
const EHPersonality EHPersonality::ZOS_CPlusPlus = {"__zos_cxx_personality_v2",
131+
nullptr};
130132

131133
static const EHPersonality &getCPersonality(const TargetInfo &Target,
132134
const LangOptions &L) {
@@ -187,6 +189,8 @@ static const EHPersonality &getCXXPersonality(const TargetInfo &Target,
187189
return EHPersonality::GNU_CPlusPlus_SEH;
188190
if (L.hasWasmExceptions())
189191
return EHPersonality::GNU_Wasm_CPlusPlus;
192+
if (T.isOSzOS())
193+
return EHPersonality::ZOS_CPlusPlus;
190194
return EHPersonality::GNU_CPlusPlus;
191195
}
192196

clang/lib/Format/Format.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,8 +1701,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) {
17011701
/*BasedOnStyle=*/"google",
17021702
},
17031703
};
1704-
GoogleStyle.AttributeMacros.push_back("GUARDED_BY");
1705-
GoogleStyle.AttributeMacros.push_back("ABSL_GUARDED_BY");
17061704

17071705
GoogleStyle.SpacesBeforeTrailingComments = 2;
17081706
GoogleStyle.Standard = FormatStyle::LS_Auto;

clang/lib/Format/TokenAnnotator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2209,7 +2209,8 @@ class AnnotatingParser {
22092209
(!NextNonComment && !Line.InMacroBody) ||
22102210
(NextNonComment &&
22112211
(NextNonComment->isPointerOrReference() ||
2212-
NextNonComment->isOneOf(tok::identifier, tok::string_literal)))) {
2212+
NextNonComment->is(tok::string_literal) ||
2213+
(Line.InPragmaDirective && NextNonComment->is(tok::identifier))))) {
22132214
return false;
22142215
}
22152216

clang/lib/Headers/llvm_libc_wrappers/string.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ char *strcpy(char *__restrict, const char *__restrict) __LIBC_ATTRS;
6767
size_t strcspn(const char *, const char *) __LIBC_ATTRS;
6868
char *strdup(const char *) __LIBC_ATTRS;
6969
size_t strlen(const char *) __LIBC_ATTRS;
70-
char *strncat(char *, const char *, size_t) __LIBC_ATTRS;
70+
char *strncat(char *__restrict, const char *__restrict, size_t) __LIBC_ATTRS;
7171
int strncmp(const char *, const char *, size_t) __LIBC_ATTRS;
7272
char *strncpy(char *__restrict, const char *__restrict, size_t) __LIBC_ATTRS;
7373
char *strndup(const char *, size_t) __LIBC_ATTRS;
7474
size_t strnlen(const char *, size_t) __LIBC_ATTRS;
7575
size_t strspn(const char *, const char *) __LIBC_ATTRS;
76-
char *strtok(char *__restrict, const char *) __LIBC_ATTRS;
76+
char *strtok(char *__restrict, const char *__restrict) __LIBC_ATTRS;
7777
char *strtok_r(char *__restrict, const char *__restrict,
7878
char **__restrict) __LIBC_ATTRS;
7979
size_t strxfrm(char *__restrict, const char *__restrict, size_t) __LIBC_ATTRS;

clang/test/AST/Interp/complex.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ constexpr _Complex int I2 = {};
3737
static_assert(__real(I2) == 0, "");
3838
static_assert(__imag(I2) == 0, "");
3939

40+
static_assert(__real(4.0) == 4.0, "");
41+
static_assert(__real(12u) == 12u, "");
42+
static_assert(__imag(4.0) == 0.0, "");
43+
static_assert(__imag(13) == 0, "");
44+
45+
4046

4147
/// Standalone complex expressions.
4248
static_assert(__real((_Complex float){1.0, 3.0}) == 1.0, "");

clang/test/Analysis/Inputs/system-header-simulator-for-simple-stream.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
typedef struct __sFILE {
99
unsigned char *_p;
1010
} FILE;
11-
FILE *fopen(const char * restrict, const char * restrict) __asm("_" "fopen" );
11+
FILE *fopen(const char *restrict, const char *restrict) __asm("_" "fopen" );
1212
int fputc(int, FILE *);
13-
int fputs(const char * restrict, FILE * restrict) __asm("_" "fputs" );
13+
int fputs(const char *restrict, FILE *restrict) __asm("_" "fputs" );
1414
int fclose(FILE *);
1515
void exit(int);
1616

clang/test/Analysis/Inputs/system-header-simulator.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ int fflush(FILE *stream);
7171
size_t strlen(const char *);
7272

7373
char *strcpy(char *restrict, const char *restrict);
74-
char *strncpy(char *dst, const char *src, size_t n);
75-
char *strsep(char **stringp, const char *delim);
76-
void *memcpy(void *dst, const void *src, size_t n);
74+
char *strncpy(char *restrict dst, const char *restrict src, size_t n);
75+
char *strsep(char **restrict stringp, const char *restrict delim);
76+
void *memcpy(void *restrict dst, const void *restrict src, size_t n);
7777
void *memset(void *s, int c, size_t n);
7878

7979
typedef unsigned long __darwin_pthread_key_t;

clang/test/Analysis/bsd-string.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#define NULL ((void *)0)
88

99
typedef __typeof(sizeof(int)) size_t;
10-
size_t strlcpy(char *dst, const char *src, size_t n);
11-
size_t strlcat(char *dst, const char *src, size_t n);
10+
size_t strlcpy(char *restrict dst, const char *restrict src, size_t n);
11+
size_t strlcat(char *restrict dst, const char *restrict src, size_t n);
1212
size_t strlen(const char *s);
1313
void clang_analyzer_eval(int);
1414

clang/test/Analysis/string.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void clang_analyzer_eval(int);
7171
int scanf(const char *restrict format, ...);
7272
void *malloc(size_t);
7373
void free(void *);
74-
void *memcpy(void *dest, const void *src, size_t n);
74+
void *memcpy(void *restrict dest, const void *restrict src, size_t n);
7575

7676
//===----------------------------------------------------------------------===
7777
// strlen()
@@ -1252,7 +1252,7 @@ int strncasecmp_null_argument(char *a, size_t n) {
12521252
// strsep()
12531253
//===----------------------------------------------------------------------===
12541254

1255-
char *strsep(char **stringp, const char *delim);
1255+
char *strsep(char ** restrict stringp, const char * restrict delim);
12561256

12571257
void strsep_null_delim(char *s) {
12581258
strsep(&s, NULL); // expected-warning{{Null pointer passed as 2nd argument to strsep()}}

clang/test/CXX/drs/dr16xx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ namespace dr1696 { // dr1696: 7
472472
const A &a = A(); // #dr1696-D1-a
473473
};
474474
D1 d1 = {}; // #dr1696-d1
475-
// since-cxx14-warning@-1 {{sorry, lifetime extension of temporary created by aggregate initialization using default member initializer is not supported; lifetime of temporary will end at the end of the full-expression}}
475+
// since-cxx14-warning@-1 {{lifetime extension of temporary created by aggregate initialization using a default member initializer is not yet supported; lifetime of temporary will end at the end of the full-expression}}
476476
// since-cxx14-note@#dr1696-D1-a {{initializing field 'a' with default member initializer}}
477477

478478
struct D2 {

clang/test/CXX/drs/dr18xx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ namespace dr1815 { // dr1815: no
209209
// FIXME: needs codegen test
210210
struct A { int &&r = 0; }; // #dr1815-A
211211
A a = {};
212-
// since-cxx14-warning@-1 {{sorry, lifetime extension of temporary created by aggregate initialization using default member initializer is not supported; lifetime of temporary will end at the end of the full-expression}} FIXME
212+
// since-cxx14-warning@-1 {{lifetime extension of temporary created by aggregate initialization using a default member initializer is not yet supported; lifetime of temporary will end at the end of the full-expression}} FIXME
213213
// since-cxx14-note@#dr1815-A {{initializing field 'r' with default member initializer}}
214214

215215
struct B { int &&r = 0; }; // #dr1815-B

clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_create2_bool.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
66
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
77
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
8+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
9+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
810
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s\
911
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
12+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s \
13+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
1014
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
15+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
1116

1217
// REQUIRES: aarch64-registered-target
1318

@@ -20,19 +25,19 @@
2025
#define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
2126
#endif
2227

23-
// CHECK-LABEL: @test_svcreate2_s8(
28+
// CHECK-LABEL: @test_svcreate2_b(
2429
// CHECK-NEXT: entry:
2530
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> poison, <vscale x 16 x i1> [[X0:%.*]], i64 0)
2631
// CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TMP0]], <vscale x 16 x i1> [[X1:%.*]], i64 16)
2732
// CHECK-NEXT: ret <vscale x 32 x i1> [[TMP1]]
2833
//
29-
// CPP-CHECK-LABEL: @_Z17test_svcreate2_s8u10__SVBool_tS_(
34+
// CPP-CHECK-LABEL: @_Z16test_svcreate2_bu10__SVBool_tS_(
3035
// CPP-CHECK-NEXT: entry:
3136
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> poison, <vscale x 16 x i1> [[X0:%.*]], i64 0)
3237
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TMP0]], <vscale x 16 x i1> [[X1:%.*]], i64 16)
3338
// CPP-CHECK-NEXT: ret <vscale x 32 x i1> [[TMP1]]
3439
//
35-
svboolx2_t test_svcreate2_s8(svbool_t x0, svbool_t x1)
40+
svboolx2_t test_svcreate2_b(svbool_t x0, svbool_t x1)
3641
{
37-
return SVE_ACLE_FUNC(svcreate2,_b8,,)(x0, x1);
42+
return SVE_ACLE_FUNC(svcreate2,_b,,)(x0, x1);
3843
}

clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_create4_bool.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
66
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
77
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
8+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
9+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
810
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s\
911
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
12+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s \
13+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
1014
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
15+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
1116

1217
// REQUIRES: aarch64-registered-target
1318

@@ -20,23 +25,23 @@
2025
#define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
2126
#endif
2227

23-
// CHECK-LABEL: @test_svcreate4_b8(
28+
// CHECK-LABEL: @test_svcreate4_b(
2429
// CHECK-NEXT: entry:
2530
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> poison, <vscale x 16 x i1> [[X0:%.*]], i64 0)
2631
// CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TMP0]], <vscale x 16 x i1> [[X1:%.*]], i64 16)
2732
// CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TMP1]], <vscale x 16 x i1> [[X2:%.*]], i64 32)
2833
// CHECK-NEXT: [[TMP3:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TMP2]], <vscale x 16 x i1> [[X4:%.*]], i64 48)
2934
// CHECK-NEXT: ret <vscale x 64 x i1> [[TMP3]]
3035
//
31-
// CPP-CHECK-LABEL: @_Z17test_svcreate4_b8u10__SVBool_tS_S_S_(
36+
// CPP-CHECK-LABEL: @_Z16test_svcreate4_bu10__SVBool_tS_S_S_(
3237
// CPP-CHECK-NEXT: entry:
3338
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> poison, <vscale x 16 x i1> [[X0:%.*]], i64 0)
3439
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TMP0]], <vscale x 16 x i1> [[X1:%.*]], i64 16)
3540
// CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TMP1]], <vscale x 16 x i1> [[X2:%.*]], i64 32)
3641
// CPP-CHECK-NEXT: [[TMP3:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TMP2]], <vscale x 16 x i1> [[X4:%.*]], i64 48)
3742
// CPP-CHECK-NEXT: ret <vscale x 64 x i1> [[TMP3]]
3843
//
39-
svboolx4_t test_svcreate4_b8(svbool_t x0, svbool_t x1, svbool_t x2, svbool_t x4)
44+
svboolx4_t test_svcreate4_b(svbool_t x0, svbool_t x1, svbool_t x2, svbool_t x4)
4045
{
41-
return SVE_ACLE_FUNC(svcreate4,_b8,,)(x0, x1, x2, x4);
46+
return SVE_ACLE_FUNC(svcreate4,_b,,)(x0, x1, x2, x4);
4247
}

0 commit comments

Comments
 (0)