Skip to content

Commit 39ffbda

Browse files
Jenkinsronlieb
authored andcommitted
merge main into amd-staging
Change-Id: Idc043f9128d78080d740d4b10d1a3bfa17a43880
2 parents ec6d37a + 972353f commit 39ffbda

File tree

191 files changed

+4855
-3974
lines changed

Some content is hidden

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

191 files changed

+4855
-3974
lines changed

clang-tools-extra/clangd/refactor/tweaks/SwapBinaryOperands.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ BinaryOperatorKind swapOperator(const BinaryOperatorKind Opcode) {
126126
case BinaryOperatorKind::BO_OrAssign:
127127
return Opcode;
128128
}
129+
llvm_unreachable("Unknown BinaryOperatorKind enum");
129130
}
130131

131132
/// Swaps the operands to a binary operator

clang/include/clang/AST/APValue.h

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -314,51 +314,95 @@ class APValue {
314314
DataType Data;
315315

316316
public:
317+
/// Creates an empty APValue of type None.
317318
APValue() : Kind(None) {}
319+
/// Creates an integer APValue holding the given value.
318320
explicit APValue(APSInt I) : Kind(None) {
319321
MakeInt(); setInt(std::move(I));
320322
}
323+
/// Creates a float APValue holding the given value.
321324
explicit APValue(APFloat F) : Kind(None) {
322325
MakeFloat(); setFloat(std::move(F));
323326
}
327+
/// Creates a fixed-point APValue holding the given value.
324328
explicit APValue(APFixedPoint FX) : Kind(None) {
325329
MakeFixedPoint(std::move(FX));
326330
}
331+
/// Creates a vector APValue with \p N elements. The elements
332+
/// are read from \p E.
327333
explicit APValue(const APValue *E, unsigned N) : Kind(None) {
328334
MakeVector(); setVector(E, N);
329335
}
336+
/// Creates an integer complex APValue with the given real and imaginary
337+
/// values.
330338
APValue(APSInt R, APSInt I) : Kind(None) {
331339
MakeComplexInt(); setComplexInt(std::move(R), std::move(I));
332340
}
341+
/// Creates a float complex APValue with the given real and imaginary values.
333342
APValue(APFloat R, APFloat I) : Kind(None) {
334343
MakeComplexFloat(); setComplexFloat(std::move(R), std::move(I));
335344
}
336345
APValue(const APValue &RHS);
337346
APValue(APValue &&RHS);
338-
APValue(LValueBase B, const CharUnits &O, NoLValuePath N,
347+
/// Creates an lvalue APValue without an lvalue path.
348+
/// \param Base The base of the lvalue.
349+
/// \param Offset The offset of the lvalue.
350+
/// \param IsNullPtr Whether this lvalue is a null pointer.
351+
APValue(LValueBase Base, const CharUnits &Offset, NoLValuePath,
339352
bool IsNullPtr = false)
340353
: Kind(None) {
341-
MakeLValue(); setLValue(B, O, N, IsNullPtr);
342-
}
343-
APValue(LValueBase B, const CharUnits &O, ArrayRef<LValuePathEntry> Path,
344-
bool OnePastTheEnd, bool IsNullPtr = false)
354+
MakeLValue();
355+
setLValue(Base, Offset, NoLValuePath{}, IsNullPtr);
356+
}
357+
/// Creates an lvalue APValue with an lvalue path.
358+
/// \param Base The base of the lvalue.
359+
/// \param Offset The offset of the lvalue.
360+
/// \param Path The lvalue path.
361+
/// \param OnePastTheEnd Whether this lvalue is one-past-the-end of the
362+
/// subobject it points to.
363+
/// \param IsNullPtr Whether this lvalue is a null pointer.
364+
APValue(LValueBase Base, const CharUnits &Offset,
365+
ArrayRef<LValuePathEntry> Path, bool OnePastTheEnd,
366+
bool IsNullPtr = false)
345367
: Kind(None) {
346-
MakeLValue(); setLValue(B, O, Path, OnePastTheEnd, IsNullPtr);
347-
}
368+
MakeLValue();
369+
setLValue(Base, Offset, Path, OnePastTheEnd, IsNullPtr);
370+
}
371+
/// Creates a new array APValue.
372+
/// \param UninitArray Marker. Pass an empty UninitArray.
373+
/// \param InitElts Number of elements you're going to initialize in the
374+
/// array.
375+
/// \param Size Full size of the array.
348376
APValue(UninitArray, unsigned InitElts, unsigned Size) : Kind(None) {
349377
MakeArray(InitElts, Size);
350378
}
351-
APValue(UninitStruct, unsigned B, unsigned M) : Kind(None) {
352-
MakeStruct(B, M);
353-
}
354-
explicit APValue(const FieldDecl *D, const APValue &V = APValue())
379+
/// Creates a new struct APValue.
380+
/// \param UninitStruct Marker. Pass an empty UninitStruct.
381+
/// \param NumBases Number of bases.
382+
/// \param NumMembers Number of members.
383+
APValue(UninitStruct, unsigned NumBases, unsigned NumMembers) : Kind(None) {
384+
MakeStruct(NumBases, NumMembers);
385+
}
386+
/// Creates a new union APValue.
387+
/// \param ActiveDecl The FieldDecl of the active union member.
388+
/// \param ActiveValue The value of the active union member.
389+
explicit APValue(const FieldDecl *ActiveDecl,
390+
const APValue &ActiveValue = APValue())
355391
: Kind(None) {
356-
MakeUnion(); setUnion(D, V);
392+
MakeUnion();
393+
setUnion(ActiveDecl, ActiveValue);
357394
}
395+
/// Creates a new member pointer APValue.
396+
/// \param Member Declaration of the member
397+
/// \param IsDerivedMember Whether member is a derived one.
398+
/// \param Path The path of the member.
358399
APValue(const ValueDecl *Member, bool IsDerivedMember,
359400
ArrayRef<const CXXRecordDecl*> Path) : Kind(None) {
360401
MakeMemberPointer(Member, IsDerivedMember, Path);
361402
}
403+
/// Creates a new address label diff APValue.
404+
/// \param LHSExpr The left-hand side of the difference.
405+
/// \param RHSExpr The right-hand side of the difference.
362406
APValue(const AddrLabelExpr* LHSExpr, const AddrLabelExpr* RHSExpr)
363407
: Kind(None) {
364408
MakeAddrLabelDiff(); setAddrLabelDiff(LHSExpr, RHSExpr);

clang/include/clang/Basic/arm_sme.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ multiclass ZAReadzArray<string vg_num>{
818818
defm SVREADZ_VG2 : ZAReadzArray<"2">;
819819
defm SVREADZ_VG4 : ZAReadzArray<"4">;
820820

821-
let SMETargetGuard = "sme2,sme-lutv2" in {
821+
let SMETargetGuard = "sme-lutv2" in {
822822
def SVWRITE_LANE_ZT : SInst<"svwrite_lane_zt[_{d}]", "vidi", "cUcsUsiUilUlfhdb", MergeNone, "aarch64_sme_write_lane_zt", [IsStreaming, IsInOutZT0], [ImmCheck<0, ImmCheck0_0>, ImmCheck<2, ImmCheck1_3>]>;
823823
def SVWRITE_ZT : SInst<"svwrite_zt[_{d}]", "vid", "cUcsUsiUilUlfhdb", MergeNone, "aarch64_sme_write_zt", [IsStreaming, IsOutZT0], [ImmCheck<0, ImmCheck0_0>]>;
824824
def SVLUTI4_ZT_X4 : SInst<"svluti4_zt_{d}_x4", "4i2.u", "cUc", MergeNone, "aarch64_sme_luti4_zt_x4", [IsStreaming, IsInZT0], [ImmCheck<0, ImmCheck0_0>]>;

clang/lib/Basic/Targets/AArch64.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,12 @@ void AArch64TargetInfo::getTargetDefinesARMV95A(const LangOptions &Opts,
373373
getTargetDefinesARMV94A(Opts, Builder);
374374
}
375375

376+
void AArch64TargetInfo::getTargetDefinesARMV96A(const LangOptions &Opts,
377+
MacroBuilder &Builder) const {
378+
// Armv9.6-A does not have a v8.* equivalent, but is a superset of v9.5-A.
379+
getTargetDefinesARMV95A(Opts, Builder);
380+
}
381+
376382
void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts,
377383
MacroBuilder &Builder) const {
378384
// Target identification.
@@ -657,6 +663,8 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts,
657663
getTargetDefinesARMV94A(Opts, Builder);
658664
else if (*ArchInfo == llvm::AArch64::ARMV9_5A)
659665
getTargetDefinesARMV95A(Opts, Builder);
666+
else if (*ArchInfo == llvm::AArch64::ARMV9_6A)
667+
getTargetDefinesARMV96A(Opts, Builder);
660668

661669
// All of the __sync_(bool|val)_compare_and_swap_(1|2|4|8|16) builtins work.
662670
Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
@@ -1044,6 +1052,9 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
10441052
if (Feature == "+v9.5a" &&
10451053
ArchInfo->Version < llvm::AArch64::ARMV9_5A.Version)
10461054
ArchInfo = &llvm::AArch64::ARMV9_5A;
1055+
if (Feature == "+v9.6a" &&
1056+
ArchInfo->Version < llvm::AArch64::ARMV9_6A.Version)
1057+
ArchInfo = &llvm::AArch64::ARMV9_6A;
10471058
if (Feature == "+v8r")
10481059
ArchInfo = &llvm::AArch64::ARMV8R;
10491060
if (Feature == "+fullfp16") {

clang/lib/Basic/Targets/AArch64.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ class LLVM_LIBRARY_VISIBILITY AArch64TargetInfo : public TargetInfo {
148148
MacroBuilder &Builder) const;
149149
void getTargetDefinesARMV95A(const LangOptions &Opts,
150150
MacroBuilder &Builder) const;
151+
void getTargetDefinesARMV96A(const LangOptions &Opts,
152+
MacroBuilder &Builder) const;
151153
void getTargetDefines(const LangOptions &Opts,
152154
MacroBuilder &Builder) const override;
153155

clang/lib/Basic/Targets/ARM.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ StringRef ARMTargetInfo::getCPUAttr() const {
228228
return "9_4A";
229229
case llvm::ARM::ArchKind::ARMV9_5A:
230230
return "9_5A";
231+
case llvm::ARM::ArchKind::ARMV9_6A:
232+
return "9_6A";
231233
case llvm::ARM::ArchKind::ARMV8MBaseline:
232234
return "8M_BASE";
233235
case llvm::ARM::ArchKind::ARMV8MMainline:
@@ -891,6 +893,7 @@ void ARMTargetInfo::getTargetDefines(const LangOptions &Opts,
891893
case llvm::ARM::ArchKind::ARMV9_3A:
892894
case llvm::ARM::ArchKind::ARMV9_4A:
893895
case llvm::ARM::ArchKind::ARMV9_5A:
896+
case llvm::ARM::ArchKind::ARMV9_6A:
894897
// Filter __arm_cdp, __arm_ldcl, __arm_stcl in arm_acle.h
895898
FeatureCoprocBF = FEATURE_COPROC_B1 | FEATURE_COPROC_B3;
896899
break;
@@ -1060,6 +1063,7 @@ void ARMTargetInfo::getTargetDefines(const LangOptions &Opts,
10601063
case llvm::ARM::ArchKind::ARMV9_3A:
10611064
case llvm::ARM::ArchKind::ARMV9_4A:
10621065
case llvm::ARM::ArchKind::ARMV9_5A:
1066+
case llvm::ARM::ArchKind::ARMV9_6A:
10631067
getTargetDefinesARMV83A(Opts, Builder);
10641068
break;
10651069
}

clang/lib/Driver/Driver.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,14 @@ Driver::Driver(StringRef ClangExecutable, StringRef TargetTriple,
231231
}
232232

233233
#if defined(CLANG_CONFIG_FILE_SYSTEM_DIR)
234-
SystemConfigDir = CLANG_CONFIG_FILE_SYSTEM_DIR;
234+
if (llvm::sys::path::is_absolute(CLANG_CONFIG_FILE_SYSTEM_DIR)) {
235+
SystemConfigDir = CLANG_CONFIG_FILE_SYSTEM_DIR;
236+
} else {
237+
SmallString<128> configFileDir(Dir);
238+
llvm::sys::path::append(configFileDir, CLANG_CONFIG_FILE_SYSTEM_DIR);
239+
llvm::sys::path::remove_dots(configFileDir, true);
240+
SystemConfigDir = static_cast<std::string>(configFileDir);
241+
}
235242
#endif
236243
#if defined(CLANG_CONFIG_FILE_USER_DIR)
237244
{

clang/lib/Driver/ToolChain.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,11 @@ static void getAArch64MultilibFlags(const Driver &D,
227227
if (BranchProtectionArg) {
228228
Result.push_back(BranchProtectionArg->getAsString(Args));
229229
}
230+
231+
const Arg *ABIArg = Args.getLastArgNoClaim(options::OPT_mabi_EQ);
232+
if (ABIArg) {
233+
Result.push_back(ABIArg->getAsString(Args));
234+
}
230235
}
231236

232237
static void getARMMultilibFlags(const Driver &D,

clang/lib/Format/TokenAnnotator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ class AnnotatingParser {
366366
} else if (OpeningParen.Previous &&
367367
(OpeningParen.Previous->isOneOf(
368368
tok::kw_static_assert, tok::kw_noexcept, tok::kw_explicit,
369-
tok::kw_while, tok::l_paren, tok::comma,
369+
tok::kw_while, tok::l_paren, tok::comma, TT_CastRParen,
370370
TT_BinaryOperator) ||
371371
OpeningParen.Previous->isIf())) {
372372
// static_assert, if and while usually contain expressions.

clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_write_lane_zt.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
22

3-
// RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -target-feature +sme-lutv2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s
4-
// RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -target-feature +sme-lutv2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
5-
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -target-feature +sme-lutv2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s
6-
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -target-feature +sme-lutv2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
7-
// RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -target-feature +sme-lutv2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
3+
// RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme2 -target-feature +sme -target-feature +sme-lutv2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s
4+
// RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme2 -target-feature +sme -target-feature +sme-lutv2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
5+
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -target-feature +sme-lutv2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s
6+
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -target-feature +sme-lutv2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
7+
// RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -target-feature +sme-lutv2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
88

99
// REQUIRES: aarch64-registered-target
1010

clang/test/CodeGen/arm-acle-coproc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
// RUN: %clang_cc1 -triple armv9.3a %s -E -dD -o - | FileCheck --check-prefix=CHECK-V8 %s
2626
// RUN: %clang_cc1 -triple armv9.4a %s -E -dD -o - | FileCheck --check-prefix=CHECK-V8 %s
2727
// RUN: %clang_cc1 -triple armv9.5a %s -E -dD -o - | FileCheck --check-prefix=CHECK-V8 %s
28+
// RUN: %clang_cc1 -triple armv9.6a %s -E -dD -o - | FileCheck --check-prefix=CHECK-V8 %s
2829
// RUN: %clang_cc1 -triple thumbv4 %s -E -dD -o - | FileCheck --check-prefix=CHECK-V4-THUMB %s
2930
// RUN: %clang_cc1 -triple thumbv4t %s -E -dD -o - | FileCheck --check-prefix=CHECK-V4-THUMB %s
3031
// RUN: %clang_cc1 -triple thumbv5 %s -E -dD -o - | FileCheck --check-prefix=CHECK-V5-THUMB %s
@@ -54,6 +55,7 @@
5455
// RUN: %clang_cc1 -triple thumbv9.3a %s -E -dD -o - | FileCheck --check-prefix=CHECK-V8 %s
5556
// RUN: %clang_cc1 -triple thumbv9.4a %s -E -dD -o - | FileCheck --check-prefix=CHECK-V8 %s
5657
// RUN: %clang_cc1 -triple thumbv9.5a %s -E -dD -o - | FileCheck --check-prefix=CHECK-V8 %s
58+
// RUN: %clang_cc1 -triple thumbv9.6a %s -E -dD -o - | FileCheck --check-prefix=CHECK-V8 %s
5759
// RUN: %clang_cc1 -triple thumbv8m.base %s -E -dD -o - | FileCheck --check-prefix=CHECK-V8-BASE %s
5860
// RUN: %clang_cc1 -triple thumbv8m.main %s -E -dD -o - | FileCheck --check-prefix=CHECK-V8-MAIN %s
5961
// RUN: %clang_cc1 -triple thumbv8.1m.main %s -E -dD -o - | FileCheck --check-prefix=CHECK-V8-MAIN %s

clang/test/Driver/aarch64-v96a.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// ===== Base v9.6a architecture =====
2+
3+
// RUN: %clang -target aarch64 -march=armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A %s
4+
// RUN: %clang -target aarch64 -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A %s
5+
// RUN: %clang -target aarch64 -mlittle-endian -march=armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A %s
6+
// RUN: %clang -target aarch64 -mlittle-endian -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A %s
7+
// RUN: %clang -target aarch64_be -mlittle-endian -march=armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A %s
8+
// RUN: %clang -target aarch64_be -mlittle-endian -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A %s
9+
// GENERICV96A: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "generic" "-target-feature" "+v9.6a"
10+
11+
// RUN: %clang -target aarch64_be -march=armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A-BE %s
12+
// RUN: %clang -target aarch64_be -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A-BE %s
13+
// RUN: %clang -target aarch64 -mbig-endian -march=armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A-BE %s
14+
// RUN: %clang -target aarch64 -mbig-endian -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A-BE %s
15+
// RUN: %clang -target aarch64_be -mbig-endian -march=armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A-BE %s
16+
// RUN: %clang -target aarch64_be -mbig-endian -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A-BE %s
17+
// GENERICV96A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+v9.6a"
18+
//
19+
// ===== Features supported on aarch64 =====

clang/test/Driver/arm-cortex-cpus-1.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,3 +495,20 @@
495495
// RUN: %clang -target arm -march=armebv9.5a -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V95A %s
496496
// RUN: %clang -target arm -march=armebv9.5-a -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V95A %s
497497
// CHECK-BE-V95A: "-cc1"{{.*}} "-triple" "armebv9.5{{.*}}" "-target-cpu" "generic"
498+
//
499+
// RUN: %clang -target armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V96A %s
500+
// RUN: %clang -target arm -march=armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V96A %s
501+
// RUN: %clang -target arm -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V96A %s
502+
// RUN: %clang -target arm -march=armv9.6a -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V96A %s
503+
// RUN: %clang -target armv9.6a -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V96A %s
504+
// RUN: %clang -target arm -march=armv9.6a -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V96A %s
505+
// RUN: %clang -target arm -mlittle-endian -march=armv9.6-a -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V96A %s
506+
// CHECK-V96A: "-cc1"{{.*}} "-triple" "armv9.6{{.*}}" "-target-cpu" "generic"
507+
508+
// RUN: %clang -target armebv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V96A %s
509+
// RUN: %clang -target armv9.6a -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V96A %s
510+
// RUN: %clang -target armeb -march=armebv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V96A %s
511+
// RUN: %clang -target armeb -march=armebv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V96A %s
512+
// RUN: %clang -target arm -march=armebv9.6a -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V96A %s
513+
// RUN: %clang -target arm -march=armebv9.6-a -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V96A %s
514+
// CHECK-BE-V96A: "-cc1"{{.*}} "-triple" "armebv9.6{{.*}}" "-target-cpu" "generic"

clang/test/Driver/print-multi-selection-flags.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
// CHECK-HARD: -mfloat-abi=hard
2020
// CHECK-HARD: -mfpu=fpv5-d16
2121

22+
// RUN: %clang -print-multi-flags-experimental --target=aarch64-none-elf -mabi=aapcs | FileCheck --check-prefix=CHECK-ABI-AAPCS %s
23+
// RUN: %clang -print-multi-flags-experimental --target=aarch64-none-elf -mabi=aapcs-soft | FileCheck --check-prefix=CHECK-ABI-AAPCS-SOFT %s
24+
// CHECK-ABI-AAPCS: -mabi=aapcs
25+
// CHECK-ABI-AAPCS-SOFT: -mabi=aapcs-soft
26+
2227
// RUN: %clang -print-multi-flags-experimental --target=arm-none-eabi -mfloat-abi=soft -march=armv8-m.main+nofp | FileCheck --check-prefix=CHECK-V8MMAIN-NOFP %s
2328
// CHECK-V8MMAIN-NOFP: --target=thumbv8m.main-unknown-none-eabi
2429
// CHECK-V8MMAIN-NOFP: -mfloat-abi=soft

clang/test/Preprocessor/aarch64-target-features.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@
213213
// RUN: %clang -target aarch64-none-linux-gnu -march=armv9.3-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SVE2 %s
214214
// RUN: %clang -target aarch64-none-linux-gnu -march=armv9.4-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SVE2 %s
215215
// RUN: %clang -target aarch64-none-linux-gnu -march=armv9.5-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SVE2 %s
216+
// RUN: %clang -target aarch64-none-linux-gnu -march=armv9.6-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SVE2 %s
216217
// RUN: %clang -target aarch64-none-linux-gnu -march=armv9-a+sve2 -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SVE2 %s
217218
// CHECK-SVE2: __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1
218219
// CHECK-SVE2: __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 1
@@ -671,6 +672,7 @@
671672
// RUN: %clang -target aarch64-none-elf -march=armv9.3-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER,CHECK-V85-OR-LATER %s
672673
// RUN: %clang -target aarch64-none-elf -march=armv9.4-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER,CHECK-V85-OR-LATER %s
673674
// RUN: %clang -target aarch64-none-elf -march=armv9.5-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER,CHECK-V85-OR-LATER %s
675+
// RUN: %clang -target aarch64-none-elf -march=armv9.6-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER,CHECK-V85-OR-LATER %s
674676
// CHECK-V81-OR-LATER: __ARM_FEATURE_ATOMICS 1
675677
// CHECK-V85-OR-LATER: __ARM_FEATURE_BTI 1
676678
// CHECK-V83-OR-LATER: __ARM_FEATURE_COMPLEX 1

0 commit comments

Comments
 (0)