Skip to content

Commit 3139ef7

Browse files
committed
Merge branch 'main' into users/kparzysz/spr/m04-order-schedule
2 parents f699e9d + decb874 commit 3139ef7

File tree

774 files changed

+96057
-72877
lines changed

Some content is hidden

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

774 files changed

+96057
-72877
lines changed

bolt/lib/Core/BinaryEmitter.cpp

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -959,9 +959,9 @@ void BinaryEmitter::emitLSDA(BinaryFunction &BF, const FunctionFragment &FF) {
959959
if (NeedsLPAdjustment)
960960
LPOffsetExpr = MCBinaryExpr::createAdd(
961961
LPOffsetExpr, MCConstantExpr::create(1, *BC.Ctx), *BC.Ctx);
962-
Streamer.emitValue(LPOffsetExpr, 4);
962+
Streamer.emitULEB128Value(LPOffsetExpr);
963963
} else {
964-
Streamer.emitIntValue(0, 4);
964+
Streamer.emitULEB128IntValue(0);
965965
}
966966
};
967967
}
@@ -976,10 +976,12 @@ void BinaryEmitter::emitLSDA(BinaryFunction &BF, const FunctionFragment &FF) {
976976
Streamer.emitLabel(TTBaseRefLabel);
977977
}
978978

979-
// Emit the landing pad call site table. We use signed data4 since we can emit
980-
// a landing pad in a different part of the split function that could appear
981-
// earlier in the address space than LPStart.
982-
Streamer.emitIntValue(dwarf::DW_EH_PE_sdata4, 1);
979+
// Emit encoding of entries in the call site table. The format is used for the
980+
// call site start, length, and corresponding landing pad.
981+
if (BC.HasFixedLoadAddress)
982+
Streamer.emitIntValue(dwarf::DW_EH_PE_sdata4, 1);
983+
else
984+
Streamer.emitIntValue(dwarf::DW_EH_PE_uleb128, 1);
983985

984986
MCSymbol *CSTStartLabel = BC.Ctx->createTempSymbol("CSTStart");
985987
MCSymbol *CSTEndLabel = BC.Ctx->createTempSymbol("CSTEnd");
@@ -996,8 +998,13 @@ void BinaryEmitter::emitLSDA(BinaryFunction &BF, const FunctionFragment &FF) {
996998

997999
// Start of the range is emitted relative to the start of current
9981000
// function split part.
999-
Streamer.emitAbsoluteSymbolDiff(BeginLabel, StartSymbol, 4);
1000-
Streamer.emitAbsoluteSymbolDiff(EndLabel, BeginLabel, 4);
1001+
if (BC.HasFixedLoadAddress) {
1002+
Streamer.emitAbsoluteSymbolDiff(BeginLabel, StartSymbol, 4);
1003+
Streamer.emitAbsoluteSymbolDiff(EndLabel, BeginLabel, 4);
1004+
} else {
1005+
Streamer.emitAbsoluteSymbolDiffAsULEB128(BeginLabel, StartSymbol);
1006+
Streamer.emitAbsoluteSymbolDiffAsULEB128(EndLabel, BeginLabel);
1007+
}
10011008
emitLandingPad(CallSite.LP);
10021009
Streamer.emitULEB128IntValue(CallSite.Action);
10031010
}

clang-tools-extra/clang-include-fixer/IncludeFixer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ bool IncludeFixerActionFactory::runInvocation(
9595

9696
// Create the compiler's actual diagnostics engine. We want to drop all
9797
// diagnostics here.
98-
Compiler.createDiagnostics(new clang::IgnoringDiagConsumer,
98+
Compiler.createDiagnostics(Files->getVirtualFileSystem(),
99+
new clang::IgnoringDiagConsumer,
99100
/*ShouldOwnClient=*/true);
100101
Compiler.createSourceManager(*Files);
101102

clang-tools-extra/clang-tidy/modernize/UseStdPrintCheck.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ AST_MATCHER(StringLiteral, isOrdinary) { return Node.isOrdinary(); }
2323
} // namespace
2424

2525
UseStdPrintCheck::UseStdPrintCheck(StringRef Name, ClangTidyContext *Context)
26-
: ClangTidyCheck(Name, Context),
26+
: ClangTidyCheck(Name, Context), PP(nullptr),
2727
StrictMode(Options.getLocalOrGlobal("StrictMode", false)),
2828
PrintfLikeFunctions(utils::options::parseStringList(
2929
Options.get("PrintfLikeFunctions", ""))),
@@ -131,6 +131,7 @@ void UseStdPrintCheck::check(const MatchFinder::MatchResult &Result) {
131131
utils::FormatStringConverter::Configuration ConverterConfig;
132132
ConverterConfig.StrictMode = StrictMode;
133133
ConverterConfig.AllowTrailingNewlineRemoval = true;
134+
assert(PP && "Preprocessor should be set by registerPPCallbacks");
134135
utils::FormatStringConverter Converter(
135136
Result.Context, Printf, FormatArgOffset, ConverterConfig, getLangOpts(),
136137
*Result.SourceManager, *PP);

clang-tools-extra/clangd/Compiler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ buildCompilerInvocation(const ParseInputs &Inputs, clang::DiagnosticConsumer &D,
110110
CIOpts.VFS = Inputs.TFS->view(Inputs.CompileCommand.Directory);
111111
CIOpts.CC1Args = CC1Args;
112112
CIOpts.RecoverOnError = true;
113-
CIOpts.Diags =
114-
CompilerInstance::createDiagnostics(new DiagnosticOptions, &D, false);
113+
CIOpts.Diags = CompilerInstance::createDiagnostics(
114+
*CIOpts.VFS, new DiagnosticOptions, &D, false);
115115
CIOpts.ProbePrecompiled = false;
116116
std::unique_ptr<CompilerInvocation> CI = createInvocation(ArgStrs, CIOpts);
117117
if (!CI)
@@ -148,7 +148,7 @@ prepareCompilerInstance(std::unique_ptr<clang::CompilerInvocation> CI,
148148
auto Clang = std::make_unique<CompilerInstance>(
149149
std::make_shared<PCHContainerOperations>());
150150
Clang->setInvocation(std::move(CI));
151-
Clang->createDiagnostics(&DiagsClient, false);
151+
Clang->createDiagnostics(*VFS, &DiagsClient, false);
152152

153153
if (auto VFSWithRemapping = createVFSFromCompilerInvocation(
154154
Clang->getInvocation(), Clang->getDiagnostics(), VFS))

clang-tools-extra/clangd/ModulesBuilder.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ bool IsModuleFileUpToDate(PathRef ModuleFilePath,
188188

189189
clang::clangd::IgnoreDiagnostics IgnoreDiags;
190190
IntrusiveRefCntPtr<DiagnosticsEngine> Diags =
191-
CompilerInstance::createDiagnostics(new DiagnosticOptions, &IgnoreDiags,
191+
CompilerInstance::createDiagnostics(*VFS, new DiagnosticOptions,
192+
&IgnoreDiags,
192193
/*ShouldOwnClient=*/false);
193194

194195
LangOptions LangOpts;

clang-tools-extra/clangd/Preamble.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,9 @@ buildPreamble(PathRef FileName, CompilerInvocation CI,
613613
for (const auto &L : ASTListeners)
614614
L->sawDiagnostic(D, Diag);
615615
});
616+
auto VFS = Inputs.TFS->view(Inputs.CompileCommand.Directory);
616617
llvm::IntrusiveRefCntPtr<DiagnosticsEngine> PreambleDiagsEngine =
617-
CompilerInstance::createDiagnostics(&CI.getDiagnosticOpts(),
618+
CompilerInstance::createDiagnostics(*VFS, &CI.getDiagnosticOpts(),
618619
&PreambleDiagnostics,
619620
/*ShouldOwnClient=*/false);
620621
const Config &Cfg = Config::current();
@@ -651,7 +652,6 @@ buildPreamble(PathRef FileName, CompilerInvocation CI,
651652
for (const auto &L : ASTListeners)
652653
L->beforeExecute(CI);
653654
});
654-
auto VFS = Inputs.TFS->view(Inputs.CompileCommand.Directory);
655655
llvm::SmallString<32> AbsFileName(FileName);
656656
VFS->makeAbsolute(AbsFileName);
657657
auto StatCache = std::make_shared<PreambleFileStatusCache>(AbsFileName);

clang-tools-extra/include-cleaner/unittests/RecordTest.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -609,15 +609,6 @@ TEST_F(PragmaIncludeTest, ExportInUnnamedBuffer) {
609609
)cpp";
610610
Inputs.ExtraFiles["foo.h"] = "";
611611

612-
auto Clang = std::make_unique<CompilerInstance>(
613-
std::make_shared<PCHContainerOperations>());
614-
Clang->createDiagnostics();
615-
616-
Clang->setInvocation(std::make_unique<CompilerInvocation>());
617-
ASSERT_TRUE(CompilerInvocation::CreateFromArgs(
618-
Clang->getInvocation(), {Filename.data()}, Clang->getDiagnostics(),
619-
"clang"));
620-
621612
// Create unnamed memory buffers for all the files.
622613
auto VFS = llvm::makeIntrusiveRefCnt<llvm::vfs::InMemoryFileSystem>();
623614
VFS->addFile(Filename, /*ModificationTime=*/0,
@@ -626,6 +617,16 @@ TEST_F(PragmaIncludeTest, ExportInUnnamedBuffer) {
626617
VFS->addFile(Extra.getKey(), /*ModificationTime=*/0,
627618
llvm::MemoryBuffer::getMemBufferCopy(Extra.getValue(),
628619
/*BufferName=*/""));
620+
621+
auto Clang = std::make_unique<CompilerInstance>(
622+
std::make_shared<PCHContainerOperations>());
623+
Clang->createDiagnostics(*VFS);
624+
625+
Clang->setInvocation(std::make_unique<CompilerInvocation>());
626+
ASSERT_TRUE(CompilerInvocation::CreateFromArgs(
627+
Clang->getInvocation(), {Filename.data()}, Clang->getDiagnostics(),
628+
"clang"));
629+
629630
auto *FM = Clang->createFileManager(VFS);
630631
ASSERT_TRUE(Clang->ExecuteAction(*Inputs.MakeAction()));
631632
EXPECT_THAT(

clang/cmake/caches/Fuchsia-stage2.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ foreach(target armv6m-none-eabi;armv7m-none-eabi;armv8m.main-none-eabi;armv8.1m.
332332
foreach(lang C;CXX;ASM)
333333
# TODO: The preprocessor defines workaround various issues in libc and libc++ integration.
334334
# These should be addressed and removed over time.
335-
set(RUNTIMES_${target}_CMAKE_${lang}_local_flags "--target=${target} -mthumb -Wno-atomic-alignment \"-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \"-Dfprintf(stream, format, ...)=printf(format)\" \"-Dtimeval=struct timeval{int tv_sec; int tv_usec;}\" \"-Dgettimeofday(tv, tz)\" -D_LIBCPP_PRINT=1")
335+
set(RUNTIMES_${target}_CMAKE_${lang}_local_flags "--target=${target} -mthumb -Wno-atomic-alignment \"-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \"-Dfprintf(stream, format, ...)=printf(format)\" \"-Dgettimeofday(tv, tz)\" -D_LIBCPP_PRINT=1")
336336
if(${target} STREQUAL "armv8m.main-none-eabi")
337337
set(RUNTIMES_${target}_CMAKE_${lang}_local_flags "${RUNTIMES_${target}_CMAKE_${lang}_local_flags} -mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "")
338338
endif()
@@ -346,7 +346,6 @@ foreach(target armv6m-none-eabi;armv7m-none-eabi;armv8m.main-none-eabi;armv8.1m.
346346
endforeach()
347347
set(RUNTIMES_${target}_LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
348348
set(RUNTIMES_${target}_LIBC_ENABLE_USE_BY_CLANG ON CACHE BOOL "")
349-
set(RUNTIMES_${target}_LIBC_USE_NEW_HEADER_GEN OFF CACHE BOOL "")
350349
set(RUNTIMES_${target}_LIBCXX_ABI_VERSION 2 CACHE STRING "")
351350
set(RUNTIMES_${target}_LIBCXX_CXX_ABI none CACHE STRING "")
352351
set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
@@ -391,14 +390,13 @@ foreach(target riscv32-unknown-elf)
391390
foreach(lang C;CXX;ASM)
392391
# TODO: The preprocessor defines workaround various issues in libc and libc++ integration.
393392
# These should be addressed and removed over time.
394-
set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "--target=${target} -march=rv32imafc -mabi=ilp32f -Wno-atomic-alignment \"-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \"-Dfprintf(stream, format, ...)=printf(format)\" \"-Dtimeval=struct timeval{int tv_sec; int tv_usec;}\" \"-Dgettimeofday(tv, tz)\" -D_LIBCPP_PRINT=1" CACHE STRING "")
393+
set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "--target=${target} -march=rv32imafc -mabi=ilp32f -Wno-atomic-alignment \"-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \"-Dfprintf(stream, format, ...)=printf(format)\" \"-Dgettimeofday(tv, tz)\" -D_LIBCPP_PRINT=1" CACHE STRING "")
395394
endforeach()
396395
foreach(type SHARED;MODULE;EXE)
397396
set(RUNTIMES_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
398397
endforeach()
399398
set(RUNTIMES_${target}_LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
400399
set(RUNTIMES_${target}_LIBC_ENABLE_USE_BY_CLANG ON CACHE BOOL "")
401-
set(RUNTIMES_${target}_LIBC_USE_NEW_HEADER_GEN OFF CACHE BOOL "")
402400
set(RUNTIMES_${target}_LIBCXX_ABI_VERSION 2 CACHE STRING "")
403401
set(RUNTIMES_${target}_LIBCXX_CXX_ABI none CACHE STRING "")
404402
set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")

clang/docs/LanguageExtensions.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,10 @@ at the end to the next power of 2.
732732

733733
These reductions support both fixed-sized and scalable vector types.
734734

735+
The integer reduction intrinsics, including ``__builtin_reduce_add``,
736+
``__builtin_reduce_mul``, ``__builtin_reduce_and``, ``__builtin_reduce_or``,
737+
and ``__builtin_reduce_xor``, can be called in a ``constexpr`` context.
738+
735739
Example:
736740

737741
.. code-block:: c++

clang/docs/RealtimeSanitizer.rst

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ A **partial** list of flags RealtimeSanitizer respects:
167167
* - ``halt_on_error``
168168
- ``true``
169169
- boolean
170-
- Exit after first reported error. If false (continue after a detected error), deduplicates error stacks so errors appear only once.
170+
- Exit after first reported error.
171+
* - ``suppress_equal_stacks``
172+
- ``true``
173+
- boolean
174+
- If true, suppress duplicate reports (i.e. only print each unique error once). Only particularly useful when ``halt_on_error=false``.
171175
* - ``print_stats_on_exit``
172176
- ``false``
173177
- boolean
@@ -203,6 +207,44 @@ Some issues with flags can be debugged using the ``verbosity=$NUM`` flag:
203207
misspelled_flag
204208
...
205209
210+
Additional customization
211+
------------------------
212+
213+
In addition to ``__rtsan_default_options`` outlined above, you can provide definitions of other functions that affect how RTSan operates.
214+
215+
To be notified on every error reported by RTsan, provide a definition of ``__sanitizer_report_error_summary``.
216+
217+
.. code-block:: c
218+
219+
extern "C" void __sanitizer_report_error_summary(const char *error_summary) {
220+
fprintf(stderr, "%s %s\n", "In custom handler! ", error_summary);
221+
/* do other custom things */
222+
}
223+
224+
The error summary will be of the form:
225+
226+
.. code-block:: console
227+
228+
SUMMARY: RealtimeSanitizer: unsafe-library-call main.cpp:8 in process(std::__1::vector<int, std::__1::allocator<int>>&)
229+
230+
To register a callback which will be invoked before a RTSan kills the process:
231+
232+
.. code-block:: c
233+
234+
extern "C" void __sanitizer_set_death_callback(void (*callback)(void));
235+
236+
void custom_on_die_callback() {
237+
fprintf(stderr, "In custom handler!")
238+
/* do other custom things */
239+
}
240+
241+
int main()
242+
{
243+
__sanitizer_set_death_callback(custom_on_die_callback);
244+
...
245+
}
246+
247+
206248
Disabling and suppressing
207249
-------------------------
208250

clang/docs/ReleaseNotes.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,17 @@ C++ Specific Potentially Breaking Changes
148148
// Now diagnoses with an error.
149149
void f(int& i [[clang::lifetimebound]]);
150150

151+
- Clang now rejects all field accesses on null pointers in constant expressions. The following code
152+
used to work but will now be rejected:
153+
154+
.. code-block:: c++
155+
156+
struct S { int a; int b; };
157+
constexpr const int *p = &((S*)nullptr)->b;
158+
159+
Previously, this code was erroneously accepted.
160+
161+
151162
ABI Changes in This Version
152163
---------------------------
153164

@@ -358,6 +369,7 @@ Non-comprehensive list of changes in this release
358369
- ``__builtin_reduce_add`` function can now be used in constant expressions.
359370
- ``__builtin_reduce_mul`` function can now be used in constant expressions.
360371
- ``__builtin_reduce_and`` function can now be used in constant expressions.
372+
- ``__builtin_reduce_or`` and ``__builtin_reduce_xor`` functions can now be used in constant expressions.
361373

362374
New Compiler Flags
363375
------------------
@@ -561,6 +573,11 @@ Improvements to Clang's diagnostics
561573

562574
- Clang now diagnoses missing return value in functions containing ``if consteval`` (#GH116485).
563575

576+
- Clang now correctly recognises code after a call to a ``[[noreturn]]`` constructor
577+
as unreachable (#GH63009).
578+
579+
- Clang now omits shadowing warnings for parameter names in explicit object member functions (#GH95707).
580+
564581
Improvements to Clang's time-trace
565582
----------------------------------
566583

clang/include/clang/Basic/Attr.td

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4888,3 +4888,10 @@ def ClspvLibclcBuiltin: InheritableAttr {
48884888
let Documentation = [ClspvLibclcBuiltinDoc];
48894889
let SimpleHandler = 1;
48904890
}
4891+
4892+
def NoTrivialAutoVarInit: InheritableAttr {
4893+
let Spellings = [Declspec<"no_init_all">];
4894+
let Subjects = SubjectList<[Function, Tag]>;
4895+
let Documentation = [NoTrivialAutoVarInitDocs];
4896+
let SimpleHandler = 1;
4897+
}

clang/include/clang/Basic/AttrDocs.td

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8760,6 +8760,18 @@ Attribute used by `clspv`_ (OpenCL-C to Vulkan SPIR-V compiler) to identify func
87608760
}];
87618761
}
87628762

8763+
def NoTrivialAutoVarInitDocs : Documentation {
8764+
let Category = DocCatDecl;
8765+
let Content = [{
8766+
The ``__declspec(no_init_all)`` attribute disables the automatic initialization that the
8767+
`-ftrivial-auto-var-init`_ flag would have applied to locals in a marked function, or instances of
8768+
a marked type. Note that this attribute has no effect for locals that are automatically initialized
8769+
without the `-ftrivial-auto-var-init`_ flag.
8770+
8771+
.. _`-ftrivial-auto-var-init`: ClangCommandLineReference.html#cmdoption-clang-ftrivial-auto-var-init
8772+
}];
8773+
}
8774+
87638775
def DocCatNonBlockingNonAllocating : DocumentationCategory<"Performance Constraint Attributes"> {
87648776
let Content = [{
87658777
The ``nonblocking``, ``blocking``, ``nonallocating`` and ``allocating`` attributes can be attached

clang/include/clang/Basic/Builtins.td

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,13 +1486,13 @@ def ReduceMinimum : Builtin {
14861486

14871487
def ReduceXor : Builtin {
14881488
let Spellings = ["__builtin_reduce_xor"];
1489-
let Attributes = [NoThrow, Const, CustomTypeChecking];
1489+
let Attributes = [NoThrow, Const, CustomTypeChecking, Constexpr];
14901490
let Prototype = "void(...)";
14911491
}
14921492

14931493
def ReduceOr : Builtin {
14941494
let Spellings = ["__builtin_reduce_or"];
1495-
let Attributes = [NoThrow, Const, CustomTypeChecking];
1495+
let Attributes = [NoThrow, Const, CustomTypeChecking, Constexpr];
14961496
let Prototype = "void(...)";
14971497
}
14981498

@@ -4750,6 +4750,12 @@ def HLSLAny : LangBuiltin<"HLSL_LANG"> {
47504750
let Prototype = "bool(...)";
47514751
}
47524752

4753+
def HLSLWaveActiveAnyTrue : LangBuiltin<"HLSL_LANG"> {
4754+
let Spellings = ["__builtin_hlsl_wave_active_any_true"];
4755+
let Attributes = [NoThrow, Const];
4756+
let Prototype = "bool(bool)";
4757+
}
4758+
47534759
def HLSLWaveActiveCountBits : LangBuiltin<"HLSL_LANG"> {
47544760
let Spellings = ["__builtin_hlsl_wave_active_count_bits"];
47554761
let Attributes = [NoThrow, Const];

clang/include/clang/Basic/BuiltinsAMDGPU.def

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,14 @@ TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_fp8_f32, "ifiiIi", "nc", "fp8-conversion-
434434
//===----------------------------------------------------------------------===//
435435
// GFX950 only builtins.
436436
//===----------------------------------------------------------------------===//
437+
TARGET_BUILTIN(__builtin_amdgcn_mfma_scale_f32_16x16x128_f8f6f4, "V4fV8ZiV8ZiV4fIiIiIiiIii", "nc", "gfx950-insts")
438+
TARGET_BUILTIN(__builtin_amdgcn_mfma_scale_f32_32x32x64_f8f6f4, "V16fV8ZiV8ZiV16fIiIiIiiIii", "nc", "gfx950-insts")
439+
437440
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x32_f16, "V4fV8hV8hV4fIiIiIi", "nc", "gfx950-insts")
438441
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x16_f16, "V16fV8hV8hV16fIiIiIi", "nc", "gfx950-insts")
439-
440442
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x16_bf16, "V16fV8yV8yV16fIiIiIi", "nc", "gfx950-insts")
443+
TARGET_BUILTIN(__builtin_amdgcn_mfma_i32_16x16x64_i8, "V4iV4iV4iV4iIiIiIi", "nc", "gfx950-insts")
444+
TARGET_BUILTIN(__builtin_amdgcn_mfma_i32_32x32x32_i8, "V16iV4iV4iV16iIiIiIi", "nc", "gfx950-insts")
441445

442446
//===----------------------------------------------------------------------===//
443447
// GFX12+ only builtins.

clang/include/clang/Basic/arm_neon.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def OP_BFMLALT_LN
252252

253253
def OP_VCVT_F32_BF16
254254
: Op<(bitcast "R",
255-
(call "vshll_n", (bitcast "int16x4_t", $p0),
255+
(call "vshll_n", (bitcast "uint16x4_t", $p0),
256256
(literal "int32_t", "16")))>;
257257
def OP_VCVT_F32_BF16_LO
258258
: Op<(call "vcvt_f32_bf16", (call "vget_low", $p0))>;
@@ -275,8 +275,8 @@ def OP_VCVT_BF16_F32_HI_A32
275275
(call "vget_low", $p0))>;
276276

277277
def OP_CVT_F32_BF16
278-
: Op<(bitcast "R", (op "<<", (cast "int32_t", (bitcast "int16_t", $p0)),
279-
(literal "int32_t", "16")))>;
278+
: Op<(bitcast "R", (op "<<", (cast "uint32_t", (bitcast "uint16_t", $p0)),
279+
(literal "uint32_t", "16")))>;
280280

281281
//===----------------------------------------------------------------------===//
282282
// Auxiliary Instructions

clang/include/clang/Basic/arm_neon_incl.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ def OP_UNAVAILABLE : Operation {
218218
// h: half-float
219219
// d: double
220220
// b: bfloat16
221+
// m: mfloat8
221222
//
222223
// Typespec modifiers
223224
// ------------------

0 commit comments

Comments
 (0)