Skip to content

Commit 7973f35

Browse files
authored
Merge pull request rust-lang#169 from nikic/rust-18-rc4
Update to LLVM 18.1.0 rc 4
2 parents edb85c3 + ffe63e3 commit 7973f35

File tree

92 files changed

+9538
-182
lines changed

Some content is hidden

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

92 files changed

+9538
-182
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ code bases.
5858
5959
To reduce such widespread breakages, as an extension, Clang accepts this code
6060
with an existing warning ``-Wambiguous-reversed-operator`` warning.
61-
Fixes `GH <https://github.com/llvm/llvm-project/issues/53954>`_.
61+
Fixes `#53954 <https://github.com/llvm/llvm-project/issues/53954>`_.
6262

6363
- The CMake variable ``GCC_INSTALL_PREFIX`` (which sets the default
6464
``--gcc-toolchain=``) is deprecated and will be removed. Specify
6565
``--gcc-install-dir=`` or ``--gcc-triple=`` in a `configuration file
66-
<https://clang.llvm.org/docs/UsersManual.html#configuration-files>` as a
66+
<https://clang.llvm.org/docs/UsersManual.html#configuration-files>`_ as a
6767
replacement.
6868
(`#77537 <https://github.com/llvm/llvm-project/pull/77537>`_)
6969

@@ -95,7 +95,7 @@ C/C++ Language Potentially Breaking Changes
9595

9696
- Fixed a bug in finding matching `operator!=` while adding reversed `operator==` as
9797
outlined in "The Equality Operator You Are Looking For" (`P2468 <http://wg21.link/p2468r2>`_).
98-
Fixes (`#68901: <https://github.com/llvm/llvm-project/issues/68901>`_).
98+
Fixes (`#68901 <https://github.com/llvm/llvm-project/issues/68901>`_).
9999

100100
C++ Specific Potentially Breaking Changes
101101
-----------------------------------------
@@ -139,10 +139,10 @@ C++ Specific Potentially Breaking Changes
139139

140140
- Remove the hardcoded path to the imported modules for C++20 named modules. Now we
141141
require all the dependent modules to specified from the command line.
142-
See (`#62707: <https://github.com/llvm/llvm-project/issues/62707>`_).
142+
See (`#62707 <https://github.com/llvm/llvm-project/issues/62707>`_).
143143

144144
- Forbid `import XXX;` in C++ to find module `XXX` comes from explicit clang modules.
145-
See (`#64755: <https://github.com/llvm/llvm-project/issues/64755>`_).
145+
See (`#64755 <https://github.com/llvm/llvm-project/issues/64755>`_).
146146

147147
ABI Changes in This Version
148148
---------------------------
@@ -199,7 +199,7 @@ C++ Language Changes
199199

200200
C++20 Feature Support
201201
^^^^^^^^^^^^^^^^^^^^^
202-
- Implemented `P1907R1 <https://wg21.link/P1907R1>` which extends allowed non-type template argument
202+
- Implemented `P1907R1 <https://wg21.link/P1907R1>`_ which extends allowed non-type template argument
203203
kinds with e.g. floating point values and pointers and references to subobjects.
204204
This feature is still experimental. Accordingly, ``__cpp_nontype_template_args`` was not updated.
205205
However, its support can be tested with ``__has_extension(cxx_generalized_nttp)``.
@@ -259,7 +259,7 @@ Resolutions to C++ Defect Reports
259259

260260
- Implemented `CWG2598 <https://wg21.link/CWG2598>`_ and `CWG2096 <https://wg21.link/CWG2096>`_,
261261
making unions (that have either no members or at least one literal member) literal types.
262-
(`#77924: <https://github.com/llvm/llvm-project/issues/77924>`_).
262+
(`#77924 <https://github.com/llvm/llvm-project/issues/77924>`_).
263263

264264

265265
C Language Changes
@@ -415,7 +415,7 @@ Attribute Changes in Clang
415415
types after default argument promotion. As a result, it's no longer an
416416
automatic diagnostic to use parameters of types that the format style
417417
supports but that are never the result of default argument promotion, such as
418-
``float``. (`#59824: <https://github.com/llvm/llvm-project/issues/59824>`_)
418+
``float``. (`#59824 <https://github.com/llvm/llvm-project/issues/59824>`_)
419419

420420
- Clang now supports ``[[clang::preferred_type(type-name)]]`` as an attribute
421421
which can be applied to a bit-field. This attribute helps to map a bit-field
@@ -483,13 +483,13 @@ Improvements to Clang's diagnostics
483483
- Clang's ``-Wtautological-negation-compare`` flag now diagnoses logical
484484
tautologies like ``x && !x`` and ``!x || x`` in expressions. This also
485485
makes ``-Winfinite-recursion`` diagnose more cases.
486-
(`#56035: <https://github.com/llvm/llvm-project/issues/56035>`_).
486+
(`#56035 <https://github.com/llvm/llvm-project/issues/56035>`_).
487487
- Clang constexpr evaluator now diagnoses compound assignment operators against
488488
uninitialized variables as a read of uninitialized object.
489489
(`#51536 <https://github.com/llvm/llvm-project/issues/51536>`_)
490490
- Clang's ``-Wformat-truncation`` now diagnoses ``snprintf`` call that is known to
491491
result in string truncation.
492-
(`#64871: <https://github.com/llvm/llvm-project/issues/64871>`_).
492+
(`#64871 <https://github.com/llvm/llvm-project/issues/64871>`_).
493493
Existing warnings that similarly warn about the overflow in ``sprintf``
494494
now falls under its own warning group ```-Wformat-overflow`` so that it can
495495
be disabled separately from ``Wfortify-source``.
@@ -505,12 +505,12 @@ Improvements to Clang's diagnostics
505505
- Clang now emits ``-Wcast-qual`` for functional-style cast expressions.
506506
- Clang no longer emits irrelevant notes about unsatisfied constraint expressions
507507
on the left-hand side of ``||`` when the right-hand side constraint is satisfied.
508-
(`#54678: <https://github.com/llvm/llvm-project/issues/54678>`_).
508+
(`#54678 <https://github.com/llvm/llvm-project/issues/54678>`_).
509509
- Clang now prints its 'note' diagnostic in cyan instead of black, to be more compatible
510510
with terminals with dark background colors. This is also more consistent with GCC.
511511
- Clang now displays an improved diagnostic and a note when a defaulted special
512512
member is marked ``constexpr`` in a class with a virtual base class
513-
(`#64843: <https://github.com/llvm/llvm-project/issues/64843>`_).
513+
(`#64843 <https://github.com/llvm/llvm-project/issues/64843>`_).
514514
- ``-Wfixed-enum-extension`` and ``-Wmicrosoft-fixed-enum`` diagnostics are no longer
515515
emitted when building as C23, since C23 standardizes support for enums with a
516516
fixed underlying type.
@@ -550,10 +550,10 @@ Improvements to Clang's diagnostics
550550
1 | static_assert("A\n"[1] == U'🌍');
551551
| ~~~~~~~~~^~~~~~~~
552552
- Clang now always diagnoses when using non-standard layout types in ``offsetof`` .
553-
(`#64619: <https://github.com/llvm/llvm-project/issues/64619>`_)
553+
(`#64619 <https://github.com/llvm/llvm-project/issues/64619>`_)
554554
- Clang now diagnoses redefined defaulted constructor when redefined
555555
defaulted constructor with different exception specs.
556-
(`#69094: <https://github.com/llvm/llvm-project/issues/69094>`_)
556+
(`#69094 <https://github.com/llvm/llvm-project/issues/69094>`_)
557557
- Clang now diagnoses use of variable-length arrays in C++ by default (and
558558
under ``-Wall`` in GNU++ mode). This is an extension supported by Clang and
559559
GCC, but is very easy to accidentally use without realizing it's a
@@ -629,7 +629,7 @@ Improvements to Clang's diagnostics
629629
630630
- Clang now diagnoses definitions of friend function specializations, e.g. ``friend void f<>(int) {}``.
631631
- Clang now diagnoses narrowing conversions involving const references.
632-
(`#63151: <https://github.com/llvm/llvm-project/issues/63151>`_).
632+
(`#63151 <https://github.com/llvm/llvm-project/issues/63151>`_).
633633
- Clang now diagnoses unexpanded packs within the template argument lists of function template specializations.
634634
- The warning `-Wnan-infinity-disabled` is now emitted when ``INFINITY``
635635
or ``NAN`` are used in arithmetic operations or function arguments in
@@ -639,7 +639,7 @@ Improvements to Clang's diagnostics
639639
- Clang now diagnoses attempts to bind a bitfield to an NTTP of a reference type as erroneous
640640
converted constant expression and not as a reference to subobject.
641641
- Clang now diagnoses ``auto`` and ``decltype(auto)`` in declarations of conversion function template
642-
(`CWG1878: <https://cplusplus.github.io/CWG/issues/1878.html>`_)
642+
(`CWG1878 <https://cplusplus.github.io/CWG/issues/1878.html>`_)
643643
- Clang now diagnoses the requirement that non-template friend declarations with requires clauses
644644
and template friend declarations with a constraint that depends on a template parameter from an
645645
enclosing template must be a definition.
@@ -670,15 +670,15 @@ Improvements to Clang's diagnostics
670670
671671
- Clang now diagnoses import before module declarations but not in global
672672
module fragment.
673-
(`#67627: <https://github.com/llvm/llvm-project/issues/67627>`_).
673+
(`#67627 <https://github.com/llvm/llvm-project/issues/67627>`_).
674674

675675
- Clang now diagnoses include headers with angle in module purviews, which is
676676
not usually intended.
677-
(`#68615: <https://github.com/llvm/llvm-project/issues/68615>`_)
677+
(`#68615 <https://github.com/llvm/llvm-project/issues/68615>`_)
678678

679679
- Clang now won't mention invisible namespace when diagnose invisible declarations
680680
inside namespace. The original diagnostic message is confusing.
681-
(`#73893: <https://github.com/llvm/llvm-project/issues/73893>`_)
681+
(`#73893 <https://github.com/llvm/llvm-project/issues/73893>`_)
682682

683683
Improvements to Clang's time-trace
684684
----------------------------------
@@ -963,7 +963,7 @@ Bug Fixes to C++ Support
963963

964964
- Fix a crash when calling a non-constant immediate function
965965
in the initializer of a static data member.
966-
(`#65985 <https://github.com/llvm/llvm-project/issues/65985>_`).
966+
(`#65985 <https://github.com/llvm/llvm-project/issues/65985>`_).
967967
- Clang now properly converts static lambda call operator to function
968968
pointers on win32.
969969
(`#62594 <https://github.com/llvm/llvm-project/issues/62594>`_)
@@ -972,7 +972,7 @@ Bug Fixes to C++ Support
972972
of a function template or a member function of a class template was assigned
973973
the location of a non-defining declaration rather than the location of the
974974
definition the specialization was instantiated from.
975-
(`#26057 <https://github.com/llvm/llvm-project/issues/26057>`_`)
975+
(`#26057 <https://github.com/llvm/llvm-project/issues/26057>`_)
976976

977977
- Fix a crash when a default member initializer of a base aggregate
978978
makes an invalid call to an immediate function.
@@ -983,11 +983,11 @@ Bug Fixes to C++ Support
983983
(`#48527 <https://github.com/llvm/llvm-project/issues/48527>`_)
984984

985985
- Clang now no longer asserts when an UnresolvedLookupExpr is used as an
986-
expression requirement. (`#66612 https://github.com/llvm/llvm-project/issues/66612`)
986+
expression requirement. (`#66612 <https://github.com/llvm/llvm-project/issues/66612>`_)
987987

988988
- Clang now disambiguates NTTP types when printing diagnostics where the
989989
NTTP types are compared with the 'diff' method.
990-
(`#66744 https://github.com/llvm/llvm-project/issues/66744`)
990+
(`#66744 <https://github.com/llvm/llvm-project/issues/66744>`_)
991991

992992
- Fix crash caused by a spaceship operator returning a comparision category by
993993
reference. Fixes:
@@ -1099,6 +1099,11 @@ Bug Fixes to C++ Support
10991099
- Fix incorrect code generation caused by the object argument of ``static operator()`` and ``static operator[]`` calls not being evaluated.
11001100
Fixes (`#67976 <https://github.com/llvm/llvm-project/issues/67976>`_)
11011101

1102+
- Fix crash when using an immediate-escalated function at global scope.
1103+
(`#82258 <https://github.com/llvm/llvm-project/issues/82258>`_)
1104+
- Correctly immediate-escalate lambda conversion functions.
1105+
(`#82258 <https://github.com/llvm/llvm-project/issues/82258>`_)
1106+
11021107
Bug Fixes to AST Handling
11031108
^^^^^^^^^^^^^^^^^^^^^^^^^
11041109
- Fixed an import failure of recursive friend class template.
@@ -1286,6 +1291,7 @@ RISC-V Support
12861291
for RV64.
12871292

12881293
- ``__attribute__((rvv_vector_bits(N)))`` is now supported for RVV vbool*_t types.
1294+
- ``-mtls-dialect=desc`` is now supported to enable TLS descriptors (TLSDESC).
12891295

12901296
CUDA/HIP Language Changes
12911297
^^^^^^^^^^^^^^^^^^^^^^^^^

clang/include/clang/Sema/Sema.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,9 @@ class Sema final {
10901090
if (FD) {
10911091
FD->setWillHaveBody(true);
10921092
S.ExprEvalContexts.back().InImmediateFunctionContext =
1093-
FD->isImmediateFunction();
1093+
FD->isImmediateFunction() ||
1094+
S.ExprEvalContexts[S.ExprEvalContexts.size() - 2]
1095+
.isConstantEvaluated();
10941096
S.ExprEvalContexts.back().InImmediateEscalatingFunctionContext =
10951097
S.getLangOpts().CPlusPlus20 && FD->isImmediateEscalating();
10961098
} else

clang/lib/Basic/Targets/AArch64.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ void AArch64TargetInfo::getTargetDefinesARMV83A(const LangOptions &Opts,
258258
MacroBuilder &Builder) const {
259259
Builder.defineMacro("__ARM_FEATURE_COMPLEX", "1");
260260
Builder.defineMacro("__ARM_FEATURE_JCVT", "1");
261-
Builder.defineMacro("__ARM_FEATURE_PAUTH", "1");
262261
// Also include the Armv8.2 defines
263262
getTargetDefinesARMV82A(Opts, Builder);
264263
}

clang/lib/Basic/Targets/Mips.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,14 @@ class LLVM_LIBRARY_VISIBILITY MipsTargetInfo : public TargetInfo {
237237
case 'r': // CPU registers.
238238
case 'd': // Equivalent to "r" unless generating MIPS16 code.
239239
case 'y': // Equivalent to "r", backward compatibility only.
240-
case 'f': // floating-point registers.
241240
case 'c': // $25 for indirect jumps
242241
case 'l': // lo register
243242
case 'x': // hilo register pair
244243
Info.setAllowsRegister();
245244
return true;
245+
case 'f': // floating-point registers.
246+
Info.setAllowsRegister();
247+
return FloatABI != SoftFloat;
246248
case 'I': // Signed 16-bit constant
247249
case 'J': // Integer 0
248250
case 'K': // Unsigned 16-bit constant

clang/lib/CodeGen/CodeGenPGO.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,12 @@ struct MapRegionCounters : public RecursiveASTVisitor<MapRegionCounters> {
240240
if (MCDCMaxCond == 0)
241241
return true;
242242

243-
/// At the top of the logical operator nest, reset the number of conditions.
244-
if (LogOpStack.empty())
243+
/// At the top of the logical operator nest, reset the number of conditions,
244+
/// also forget previously seen split nesting cases.
245+
if (LogOpStack.empty()) {
245246
NumCond = 0;
247+
SplitNestedLogicalOp = false;
248+
}
246249

247250
if (const Expr *E = dyn_cast<Expr>(S)) {
248251
const BinaryOperator *BinOp = dyn_cast<BinaryOperator>(E->IgnoreParens());
@@ -293,7 +296,7 @@ struct MapRegionCounters : public RecursiveASTVisitor<MapRegionCounters> {
293296
"contains an operation with a nested boolean expression. "
294297
"Expression will not be covered");
295298
Diag.Report(S->getBeginLoc(), DiagID);
296-
return false;
299+
return true;
297300
}
298301

299302
/// Was the maximum number of conditions encountered?
@@ -304,7 +307,7 @@ struct MapRegionCounters : public RecursiveASTVisitor<MapRegionCounters> {
304307
"number of conditions (%0) exceeds max (%1). "
305308
"Expression will not be covered");
306309
Diag.Report(S->getBeginLoc(), DiagID) << NumCond << MCDCMaxCond;
307-
return false;
310+
return true;
308311
}
309312

310313
// Otherwise, allocate the number of bytes required for the bitmap

clang/lib/Sema/SemaExpr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18294,7 +18294,6 @@ void Sema::CheckUnusedVolatileAssignment(Expr *E) {
1829418294
}
1829518295

1829618296
void Sema::MarkExpressionAsImmediateEscalating(Expr *E) {
18297-
assert(!FunctionScopes.empty() && "Expected a function scope");
1829818297
assert(getLangOpts().CPlusPlus20 &&
1829918298
ExprEvalContexts.back().InImmediateEscalatingFunctionContext &&
1830018299
"Cannot mark an immediate escalating expression outside of an "
@@ -18311,7 +18310,8 @@ void Sema::MarkExpressionAsImmediateEscalating(Expr *E) {
1831118310
} else {
1831218311
assert(false && "expected an immediately escalating expression");
1831318312
}
18314-
getCurFunction()->FoundImmediateEscalatingExpression = true;
18313+
if (FunctionScopeInfo *FI = getCurFunction())
18314+
FI->FoundImmediateEscalatingExpression = true;
1831518315
}
1831618316

1831718317
ExprResult Sema::CheckForImmediateInvocation(ExprResult E, FunctionDecl *Decl) {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// RUN: %clang_cc1 -emit-llvm -triple mips -target-feature +soft-float %s -o - | FileCheck %s --check-prefix=SOFT_FLOAT
2+
3+
// SOFT_FLOAT: call void asm sideeffect "", "r,~{$1}"(float %1)
4+
void read_float(float *p) {
5+
__asm__("" ::"r"(*p));
6+
}
7+
8+
// SOFT_FLOAT: call void asm sideeffect "", "r,~{$1}"(double %1)
9+
void read_double(double *p) {
10+
__asm__("" :: "r"(*p));
11+
}

clang/test/CodeGen/aarch64-targetattr.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ void minusarch() {}
9797
// CHECK: attributes #0 = { {{.*}} "target-features"="+crc,+fp-armv8,+lse,+neon,+ras,+rdm,+v8.1a,+v8.2a,+v8a" }
9898
// CHECK: attributes #1 = { {{.*}} "target-features"="+crc,+fp-armv8,+fullfp16,+lse,+neon,+ras,+rdm,+sve,+v8.1a,+v8.2a,+v8a" }
9999
// CHECK: attributes #2 = { {{.*}} "target-features"="+crc,+fp-armv8,+fullfp16,+lse,+neon,+ras,+rdm,+sve,+sve2,+v8.1a,+v8.2a,+v8a" }
100-
// CHECK: attributes #3 = { {{.*}} "target-features"="+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fullfp16,+i8mm,+jsconv,+lse,+neon,+ras,+rcpc,+rdm,+sve,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" }
100+
// CHECK: attributes #3 = { {{.*}} "target-features"="+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+ras,+rcpc,+rdm,+sve,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" }
101101
// CHECK: attributes #4 = { {{.*}} "target-cpu"="cortex-a710" "target-features"="+bf16,+complxnum,+crc,+dotprod,+flagm,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+jsconv,+lse,+mte,+neon,+pauth,+ras,+rcpc,+rdm,+sb,+sve,+sve2,+sve2-bitperm" }
102102
// CHECK: attributes #5 = { {{.*}} "tune-cpu"="cortex-a710" }
103103
// CHECK: attributes #6 = { {{.*}} "target-cpu"="generic" }
104104
// CHECK: attributes #7 = { {{.*}} "tune-cpu"="generic" }
105105
// CHECK: attributes #8 = { {{.*}} "target-cpu"="neoverse-n1" "target-features"="+aes,+crc,+dotprod,+fp-armv8,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+spe,+ssbs" "tune-cpu"="cortex-a710" }
106106
// CHECK: attributes #9 = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+sve" "tune-cpu"="cortex-a710" }
107-
// CHECK: attributes #10 = { {{.*}} "target-cpu"="neoverse-v1" "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+jsconv,+lse,+neon,+rand,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+spe,+ssbs,+sve,+sve2" }
108-
// CHECK: attributes #11 = { {{.*}} "target-cpu"="neoverse-v1" "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+jsconv,+lse,+neon,+rand,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+spe,+ssbs,-sve" }
107+
// CHECK: attributes #10 = { {{.*}} "target-cpu"="neoverse-v1" "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+rand,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+spe,+ssbs,+sve,+sve2" }
108+
// CHECK: attributes #11 = { {{.*}} "target-cpu"="neoverse-v1" "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+rand,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+spe,+ssbs,-sve" }
109109
// CHECK: attributes #12 = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+sve" }
110110
// CHECK: attributes #13 = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+sve,-sve2" }
111111
// CHECK: attributes #14 = { {{.*}} "target-features"="+fullfp16" }
112-
// CHECK: attributes #15 = { {{.*}} "target-cpu"="neoverse-n1" "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fullfp16,+i8mm,+jsconv,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+spe,+ssbs,+sve,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" "tune-cpu"="cortex-a710" }
113-
// CHECK: attributes #16 = { {{.*}} "branch-target-enforcement"="true" "guarded-control-stack"="true" {{.*}} "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fullfp16,+i8mm,+jsconv,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+spe,+ssbs,+sve,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" "tune-cpu"="cortex-a710" }
112+
// CHECK: attributes #15 = { {{.*}} "target-cpu"="neoverse-n1" "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+ras,+rcpc,+rdm,+sha2,+spe,+ssbs,+sve,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" "tune-cpu"="cortex-a710" }
113+
// CHECK: attributes #16 = { {{.*}} "branch-target-enforcement"="true" "guarded-control-stack"="true" {{.*}} "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+ras,+rcpc,+rdm,+sha2,+spe,+ssbs,+sve,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" "tune-cpu"="cortex-a710" }
114114
// CHECK: attributes #17 = { {{.*}} "target-features"="-neon" }
115115
// CHECK: attributes #18 = { {{.*}} "target-features"="-v9.3a" }

clang/test/Driver/aarch64-cssc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// RUN: %clang -S -o - -emit-llvm --target=aarch64-none-elf -march=armv9.4-a %s 2>&1 | FileCheck %s
1010
// RUN: %clang -S -o - -emit-llvm --target=aarch64-none-elf -march=armv9.4-a+cssc %s 2>&1 | FileCheck %s
1111
// RUN: %clang -S -o - -emit-llvm --target=aarch64-none-elf -march=armv9.4-a+nocssc %s 2>&1 | FileCheck %s --check-prefix=NO_CSSC
12+
// RUN: %clang -S -o - -emit-llvm --target=aarch64-none-elf -mcpu=ampere1b %s 2>&1 | FileCheck %s
1213

1314
// CHECK: "target-features"="{{.*}},+cssc
1415
// NO_CSSC: "target-features"="{{.*}},-cssc

0 commit comments

Comments
 (0)