LLVM/project 8ac8754libc/src/stdio/printf_core float_inf_nan_converter.h

[libc] Remove global printf_core StorageType declarations in float_inf_nan_converter.h (#196859)

fixed_converter.h and float_hex_converter.h have local declarations with
the same name shadowing it, causing -Wshadow warnings. The using
declaration is used in only one function, so just make it local.
DeltaFile
+6-6libc/src/stdio/printf_core/float_inf_nan_converter.h
+6-61 files

LLVM/project fbb6e2eclang/include/clang/Basic DiagnosticLexKinds.td, clang/test/Lexer __counter__-system-include.c

[clang] Don't warn on __COUNTER__ in system macros

The introduction of extension and compatibility warnings means
that __COUNTER__ has started causing warnings (and -Werror= build
failures) due to use of system APIs.

This PR simply ensures that these diagnostics don't get reported
for system macro expansions as well.
DeltaFile
+18-0clang/test/Lexer/__counter__-system-include.c
+7-0clang/test/Lexer/Inputs/__counter__-system-header.h
+2-2clang/include/clang/Basic/DiagnosticLexKinds.td
+27-23 files

LLVM/project 7ddee0bllvm/lib/Target/AMDGPU AMDGPUAsmPrinter.cpp GCNSubtarget.h, llvm/lib/Target/AMDGPU/MCTargetDesc AMDGPUMCExpr.cpp

[AMDGPU] Account for inline asm size in inst_pref_size calculation (#192306)

`SIProgramInfo::getFunctionCodeSize()` with `IsLowerBound=true` was
completely skipping inline assembly instructions, treating them as zero
bytes. This caused `amdhsa_inst_pref_size` to be severely underestimated
for kernels containing inline asm, defeating instruction prefetch on
gfx11+.

Use MCExpr label subtraction (`.Lfunc_end - func_sym`) to compute exact
function code size, resolved at assembly time. This avoids inline asm
string parsing which cannot reliably estimate code size and risks
overestimation (which causes prefetch of unmapped memory and a fatal
segfault).

Add a new `AMDGPUMCExpr` variant (`AGVK_InstPrefSize`) to compute
`min(divideCeil(codeSize, cacheLineSize), maxFieldVal)` as a custom
MCExpr, following the same pattern as `AGVK_Occupancy` and
`AGVK_AlignTo`. The cache line size and field width are derived from the
subtarget via `IsaInfo::getInstCacheLineSize` and feature-bit checks

    [24 lines not shown]
DeltaFile
+154-0llvm/test/CodeGen/AMDGPU/inst-prefetch-inline-asm.ll
+42-41llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+41-9llvm/test/CodeGen/AMDGPU/inst-prefetch-hint.ll
+45-0llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp
+18-0llvm/lib/Target/AMDGPU/GCNSubtarget.h
+3-14llvm/lib/Target/AMDGPU/SIProgramInfo.cpp
+303-644 files not shown
+324-6810 files

LLVM/project a761e2elibc/src/__support/math sqrtf128.h

[libc] Fix -Wshadow warning in sqrtf128.h (#196851)

sqrtf128() contained both `using namespace sqrtf128_internal;` and
`using FPBits = fputil::FPBits<float128>;`, but sqrtf128_internal also
had a `using FPBits = fputil::FPBits<float128>;`. The outer `using`
wasn't actually used, so remove that one.
DeltaFile
+0-2libc/src/__support/math/sqrtf128.h
+0-21 files

LLVM/project c4e932flibc/test/IntegrationTest test.cpp

[libc] Fix -Wshadow warning in IntegrationTest/test.cpp (#196858)
DeltaFile
+2-2libc/test/IntegrationTest/test.cpp
+2-21 files

LLVM/project 64a8f36lldb/source/Commands CommandObjectBreakpointCommand.cpp

[lldb] Fix missing status in CommandObjectBreakpointCommand (#197024)

This should fix Breakpoint/breakpoint-command.test after #196589.
DeltaFile
+11-2lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+11-21 files

LLVM/project 1ac5083libc/src/__support/HashTable table.h

[libc] Fix -Wshadow warning in HashTable/table.h (#196857)
DeltaFile
+3-3libc/src/__support/HashTable/table.h
+3-31 files

LLVM/project b5ce180llvm/lib/Target/AMDGPU FLATInstructions.td SMInstructions.td, llvm/test/CodeGen/AMDGPU llvm.amdgcn.flat.prefetch.ll llvm.amdgcn.global.prefetch.ll

[AMDGPU] Prevent prefetch and load reordering

Mark prefetches as having side effects, otherwise scheduler
reorders these with loads.
DeltaFile
+19-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.flat.prefetch.ll
+19-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.global.prefetch.ll
+14-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.s.prefetch.data.ll
+7-7llvm/test/CodeGen/AMDGPU/loop-prefetch-data.ll
+1-0llvm/lib/Target/AMDGPU/FLATInstructions.td
+1-0llvm/lib/Target/AMDGPU/SMInstructions.td
+61-76 files

LLVM/project 95f5a88llvm/test/CodeGen/AArch64 vec-combine-trunc-dup-ext.ll minmax.ll

[AArch64][GlobalISel] More test updates for vector select. NFC (#197023)
DeltaFile
+164-42llvm/test/CodeGen/AArch64/vec-combine-trunc-dup-ext.ll
+118-52llvm/test/CodeGen/AArch64/minmax.ll
+91-11llvm/test/CodeGen/AArch64/neon-anyof-splat.ll
+86-1llvm/test/CodeGen/AArch64/icmp.ll
+15-0llvm/test/CodeGen/AArch64/arm64-mul.ll
+474-1065 files

LLVM/project b1a4e08llvm/docs AMDGPUUsage.rst, llvm/lib/Target/AMDGPU AMDGPUAsmPrinter.cpp

[AMDGPU] Add `.amdgpu.info` section for per-function metadata (#192384)

AMDGPU object linking requires the linker to propagate resource usage
(registers, stack, LDS) across translation units. To support this, the
compiler must emit per-function metadata and call graph edges in the
relocatable object so the linker can compute whole-program resource
requirements.

This PR introduces a `.amdgpu.info` ELF section using a tagged,
length-prefixed binary format: each entry is encoded as:

```
[kind: u8] [len: u8] [payload: <len> bytes]
```

A function scope is opened by an `INFO_FUNC` entry (containing a symbol
reference), followed by per-function attributes (register counts, flags,
private segment size) and relational edges (direct calls, LDS uses,
indirect call signatures). String data such as function type signatures

    [4 lines not shown]
DeltaFile
+257-0llvm/test/CodeGen/AMDGPU/lds-link-time-codegen-typeid.ll
+179-0llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
+158-2llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+126-0llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+126-0llvm/test/MC/AMDGPU/amdgpu-info-roundtrip.s
+106-0llvm/docs/AMDGPUUsage.rst
+952-29 files not shown
+1,261-1415 files

LLVM/project ac3ca83llvm/lib/FileCheck FileCheck.cpp

[FileCheck] Fix -Wunused-variable in 48c864a (#197022)

Variable is only used in an assertion. Mark it maybe_unused rather than
inlining as the variable name makes it a bit more readable, even if it
is a common idiom.
DeltaFile
+1-1llvm/lib/FileCheck/FileCheck.cpp
+1-11 files

LLVM/project 943a7daclang-tools-extra/clangd FuzzyMatch.cpp, clang-tools-extra/clangd/unittests FuzzyMatchTests.cpp

[clangd] Fix out-of-bounds read in `packedLookup` (#197021)

The `packedLookup` function doesn't work correctly with byte values over
0x7F (e.g. UTF-8 high bytes) on platforms where `char` is signed (like
x86-64). The character is treated as a negative `char`, which gets
converted to a negative `int`, which makes `I >> 2` negative, which
gives a negative index, and thus an out-of-bounds read.

The fix is to change the `int` parameter type to `unsigned char`, to
always get the value in the 0x00..0xFF range.

The issue has been discovered by the sanitizer buildbot after the
#187623 merge, which first introduced tests with non-ASCII source
content into the code-completion path.
DeltaFile
+2-1clang-tools-extra/clangd/FuzzyMatch.cpp
+2-0clang-tools-extra/clangd/unittests/FuzzyMatchTests.cpp
+4-12 files

LLVM/project cf39eb3clang/docs LanguageExtensions.rst, clang/include/clang/Options Options.td

Enable driver changes for fexec-charset
DeltaFile
+14-6clang/lib/Driver/ToolChains/Clang.cpp
+14-4clang/include/clang/Options/Options.td
+11-3clang/test/Driver/clang_f_opts.c
+10-0llvm/lib/Support/TextEncoding.cpp
+4-3clang/test/Driver/cl-options.c
+3-3clang/docs/LanguageExtensions.rst
+56-193 files not shown
+60-199 files

LLVM/project 91824e1clang/include/clang/Basic TargetInfo.h, clang/lib/AST ASTContext.cpp

convert to exec-charset inside getPredefinedStringLiteralFromCache, test __builtin_FILE()
DeltaFile
+28-0clang/test/CodeGen/systemz-charset.cpp
+10-0clang/lib/AST/ASTContext.cpp
+5-4clang/lib/Lex/TextEncodingConfig.cpp
+3-0clang/lib/Basic/TargetInfo.cpp
+2-0clang/include/clang/Basic/TargetInfo.h
+48-45 files

LLVM/project c977a65clang/lib/AST PrintfFormatString.cpp FormatString.cpp, clang/lib/Sema SemaChecking.cpp

Add format string handling
DeltaFile
+58-31clang/lib/AST/PrintfFormatString.cpp
+46-40clang/lib/AST/FormatString.cpp
+33-21clang/lib/Sema/SemaChecking.cpp
+25-11clang/lib/AST/FormatStringParsing.h
+15-8clang/lib/AST/ScanfFormatString.cpp
+19-0llvm/lib/Support/TextEncoding.cpp
+196-11111 files not shown
+257-12117 files

LLVM/project 13ce103clang/include/clang/Sema Sema.h

Remove old include
DeltaFile
+0-1clang/include/clang/Sema/Sema.h
+0-11 files

LLVM/project 92cc35cclang/include/clang/Sema Sema.h, clang/lib/Parse ParseDecl.cpp ParseExpr.cpp

add ParserConversionAction, do not translate unevaluated strings
DeltaFile
+15-0clang/test/CodeGen/systemz-charset.c
+6-5clang/lib/Sema/SemaExpr.cpp
+10-0clang/lib/Parse/ParseDecl.cpp
+9-0clang/test/CodeGen/systemz-charset-diag.cpp
+3-3clang/lib/Parse/ParseExpr.cpp
+3-1clang/include/clang/Sema/Sema.h
+46-93 files not shown
+53-99 files

LLVM/project 418a6c5clang/lib/Lex LiteralSupport.cpp, clang/test/CodeGen systemz-charset.cpp

move conversion into EncodeUCNEscape, update testcase
DeltaFile
+23-27clang/lib/Lex/LiteralSupport.cpp
+3-0clang/test/CodeGen/systemz-charset.cpp
+26-272 files

LLVM/project b5e0ab2clang/include/clang/Sema Sema.h

Fix build failure
DeltaFile
+1-0clang/include/clang/Sema/Sema.h
+1-01 files

LLVM/project bacc3e0clang-tools-extra/test/clang-tidy/checkers/bugprone unhandled-code-paths.cpp, clang-tools-extra/test/clang-tidy/checkers/hicpp multiway-paths-covered.cpp

Merge branch 'main' into users/kparzysz/getobjectsymbol-ultimate
DeltaFile
+573-578llvm/unittests/IR/LegacyPassManagerTest.cpp
+910-1clang/test/CodeGen/AArch64/neon/perm.c
+1-797clang/test/CodeGen/AArch64/neon-perm.c
+143-572flang/lib/Lower/Bridge.cpp
+0-468clang-tools-extra/test/clang-tidy/checkers/hicpp/multiway-paths-covered.cpp
+468-0clang-tools-extra/test/clang-tidy/checkers/bugprone/unhandled-code-paths.cpp
+2,095-2,416659 files not shown
+18,593-8,847665 files

LLVM/project 422d390lldb/source/Plugins/SymbolFile/DWARF DWARFBaseDIE.h, llvm/include/llvm/DebugInfo/DWARF DWARFTypePrinter.h

Revert "[gsymutil] Fix crash caused by infinite recursion in `unwrapReference…"

This reverts commit 4d12a16b78391f5542e1bc1e748927f1f5cc6b44.
DeltaFile
+0-156llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
+10-21llvm/include/llvm/DebugInfo/DWARF/DWARFTypePrinter.h
+0-2lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h
+10-1793 files

LLVM/project 875e622lld/test/wasm/lto inline-asm-symbols.ll signature-mismatch.ll, lld/wasm SymbolTable.cpp

[lld][WebAssembly] Allow defining of arbitrary symbols types in LTO objects (#196552)

Bitcode files don't contains precise symbol type information so we
always allow the post-LTO defined symbols (from the LTO object file) to
overwrite bitcode symbols. We don't want to be reporting type mismatches
in these cases.

Fixes: #195311
DeltaFile
+24-0lld/test/wasm/lto/inline-asm-symbols.ll
+18-2lld/wasm/SymbolTable.cpp
+3-3lld/test/wasm/lto/signature-mismatch.ll
+45-53 files

LLVM/project 223a945llvm/include/llvm/CodeGen/GlobalISel LegalizerHelper.h, llvm/lib/CodeGen/GlobalISel LegalizerHelper.cpp

[GlobalISel][AArch64] Add lowering for G_SMULFIX (#196757)

Adding lowering for G_SMULFIX G_OP. It is needed to compile
`libc/src/stdfix/expk.cpp` with `-O3`.
DeltaFile
+216-79llvm/test/CodeGen/AArch64/smul_fix.ll
+181-0llvm/test/CodeGen/AArch64/GlobalISel/legalize-smulfix.mir
+26-0llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+2-2llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
+2-0llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
+1-0llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
+428-816 files

LLVM/project af2d117flang-rt/lib/runtime allocator-registry.cpp

[flang-rt] Return default allocator directly in device rt (#197009)
DeltaFile
+10-0flang-rt/lib/runtime/allocator-registry.cpp
+10-01 files

LLVM/project 78d124elldb/include/lldb/Interpreter CommandReturnObject.h, lldb/source/Commands CommandObjectProtocolServer.cpp

[lldb] Assert that CommandObject::DoExecute sets a return status (#196589)

Change the default value of CommandReturnObject::m_status from
eReturnStatusStarted to eReturnStatusInvalid, and add a debug-only RAII
check in CommandObjectParsed::Execute and CommandObjectRaw::Execute that
asserts the status is no longer Invalid after DoExecute returns.

This catches commands that forget to call SetStatus on a success or
failure path. Succeeded() still returns true when the status is Invalid
(0 sorts below eReturnStatusSuccessContinuingResult), so helpers that
read result.Succeeded() as a precondition before any explicit SetStatus
(e.g. StopProcessIfNecessary) continue to work.

rdar://176506732
DeltaFile
+38-0lldb/unittests/Interpreter/TestCommandReturnObject.cpp
+24-1lldb/source/Interpreter/CommandObject.cpp
+4-1lldb/include/lldb/Interpreter/CommandReturnObject.h
+2-2lldb/test/API/commands/command/script/TestCommandScript.py
+2-1lldb/source/Commands/CommandObjectProtocolServer.cpp
+1-1lldb/source/Interpreter/CommandReturnObject.cpp
+71-62 files not shown
+74-68 files

LLVM/project 4c0e5a5llvm/test/CodeGen/AMDGPU srem.ll load-global-i8.ll

DAGCombiner: (srl/sra (add nuw/nsw X, c), d) --> (add nuw/nsw (srl/sra X, d), c >> d)

Additional precondition:
* The LSBs of c are 0; equivalently: c >> d is exact

Alive2 for
* unsigned case: https://alive2.llvm.org/ce/z/YcJ8qA
* signed case: https://alive2.llvm.org/ce/z/fgpvyE

We already canonicalize (shl (add ...) ...) to (add (shl ...) ...).

Restrict this combine to the single-use case to minimize risk for now.
The main target of this combine is a fan-out tree of `add`s that all end
up being shifted by the same amount at the leaves. This change happens to
improve a bunch of existing CodeGen tests in AMDGPU.

v2:
- remove a redundant check on the shift amount -- large shift amounts
  results in poison anyway

    [2 lines not shown]
DeltaFile
+2,123-2,126llvm/test/CodeGen/AMDGPU/srem.ll
+1,647-1,991llvm/test/CodeGen/AMDGPU/load-global-i8.ll
+1,469-1,786llvm/test/CodeGen/AMDGPU/load-global-i16.ll
+860-1,133llvm/test/CodeGen/AMDGPU/load-constant-i1.ll
+743-910llvm/test/CodeGen/AMDGPU/load-constant-i8.ll
+682-844llvm/test/CodeGen/AMDGPU/load-constant-i16.ll
+7,524-8,79023 files not shown
+10,259-11,88029 files

LLVM/project 48c864allvm/lib/FileCheck FileCheck.cpp, llvm/test/FileCheck check-empty-tag.txt check-eof-no-pattern.txt

[FileCheck] Handle directives at EOF without a trailing newline (#196576)

FileCheck could assert when a check directive ended at EOF without a
trailing newline. After parsing the directive suffix, EOF can be a valid
continuation point, so parsing now continues directly from
`AfterSuffix`.

Fixes #101582
DeltaFile
+12-0llvm/test/FileCheck/check-empty-tag.txt
+6-6llvm/lib/FileCheck/FileCheck.cpp
+7-0llvm/test/FileCheck/check-eof-no-pattern.txt
+25-63 files

LLVM/project f86f548llvm/lib/Target/RISCV RISCVInsertVSETVLI.cpp, llvm/test/CodeGen/RISCV/rvv vsetvli-insert-O0.ll

[RISCV] Check for null LIS before trying to move AVL in canMutatePriorConfig. (#196673)

If LIS is null then the VN info are null and we don't know if we need to
move the AVL.

Fixes an assertion like
RegAllocFast.cpp:729: void (anonymous
namespace)::RegAllocFastImpl::reloadAtBegin(MachineBasicBlock &):
Assertion `(&MBB != &MBB.getParent()->front() || IgnoreMissingDefs) &&
"no reload in start block. Missing vreg def?"' failed.
DeltaFile
+38-2llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-O0.ll
+4-0llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+42-22 files

LLVM/project 1b89edcclang/include/clang/Basic TargetInfo.h, clang/lib/AST ASTContext.cpp

convert to exec-charset inside getPredefinedStringLiteralFromCache, test __builtin_FILE()
DeltaFile
+28-0clang/test/CodeGen/systemz-charset.cpp
+10-0clang/lib/AST/ASTContext.cpp
+5-4clang/lib/Lex/TextEncodingConfig.cpp
+3-0clang/lib/Basic/TargetInfo.cpp
+2-0clang/include/clang/Basic/TargetInfo.h
+48-45 files

LLVM/project 66d464fclang/docs LanguageExtensions.rst, clang/include/clang/Options Options.td

Enable driver changes for fexec-charset
DeltaFile
+14-6clang/lib/Driver/ToolChains/Clang.cpp
+14-4clang/include/clang/Options/Options.td
+11-3clang/test/Driver/clang_f_opts.c
+10-0llvm/lib/Support/TextEncoding.cpp
+4-3clang/test/Driver/cl-options.c
+3-3clang/docs/LanguageExtensions.rst
+56-193 files not shown
+60-199 files