LLVM/project f5ebc1allvm/lib/Target/AMDGPU AMDGPUMCInstLower.cpp, llvm/test/CodeGen/AMDGPU mcinstlower-external-symbol-reloc.mir

[AMDGPU] Apply target flag specifier when lowering MO_ExternalSymbol operands (#202389)

The MO_ExternalSymbol case in AMDGPUMCInstLower dropped the operand
target flags emitting the wrong relocation type
DeltaFile
+19-0llvm/test/CodeGen/AMDGPU/mcinstlower-external-symbol-reloc.mir
+2-1llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
+21-12 files

LLVM/project e3f2e35clang/lib/Serialization ASTCommon.cpp

[Serialization] Delete an unreachable BlockDecl check (NFC) (#206298)

`needsAnonymousDeclarationNumber()` takes a `const NamedDecl *`. Both
`BlockDecl` and `NamedDecl` derive from `Decl`, in other words they're
siblings.

* https://clang.llvm.org/doxygen/classclang_1_1BlockDecl.html
* https://clang.llvm.org/doxygen/classclang_1_1NamedDecl.html

Thus `isa<BlockDecl>(D)` is statically false.
DeltaFile
+1-1clang/lib/Serialization/ASTCommon.cpp
+1-11 files

LLVM/project b0e490aclang/lib/Serialization ASTCommon.cpp, clang/test/Modules modules-lambda-dependent-crash.cppm modules-local-class-dependent-crash.cppm

[Clang][Modules] Skip anonymous declaration numbering for local tags in dependent contexts (#202248)

Local tag declarations (classes, structs, enums, and lambdas) defined
within function template bodies or class templates do not require ODR
merging at the local declaration level across different modules. ODR
consistency is already guaranteed because the instantiator only walks
the canonical template definition body, which instantiates its own copy
of the local class.

Merging them across different modules causes their member definitions
(like methods or call operators) to be canonicalized to one module,
while the instantiator walks the template body from another module.
Since local variables within template bodies are not merged, this
mismatch leads to assertion crashes during template instantiation in
`LocalInstantiationScope::findInstantiationOf`.

Fixes https://github.com/llvm/llvm-project/issues/206203.

Co-authored-by: ipopov <ipopov at google.com>
DeltaFile
+73-0clang/test/Modules/modules-lambda-dependent-crash.cppm
+70-0clang/test/Modules/modules-local-class-dependent-crash.cppm
+6-2clang/lib/Serialization/ASTCommon.cpp
+149-23 files

LLVM/project 58e1038llvm/lib/Target/X86 X86TargetVerifier.cpp, llvm/test/Verifier/X86 inline-asm-registers.ll

[X86] Verify inline-asm register operands against the subtarget

Inline asm can name physical registers that require a subtarget feature
the selected subtarget lacks: zmm and mask (k) registers need AVX-512,
ymm registers need AVX. The subtarget is derived from the function's
target-cpu/target-features, so no MachineFunction is required.
DeltaFile
+33-0llvm/lib/Target/X86/X86TargetVerifier.cpp
+27-0llvm/test/Verifier/X86/inline-asm-registers.ll
+60-02 files

LLVM/project b9a267cclang CMakeLists.txt

fixup! [clang] Rename CLANG_DEFAULT_PIE_ON_LINUX to CLANG_DEFAULT_PIE
DeltaFile
+5-0clang/CMakeLists.txt
+5-01 files

LLVM/project 14a19cellvm/lib/Support/Windows Path.inc

Fix Windows Path Separator issues in create_symlink and readlink (#206665)

- Force create_symlink target path to use backslashes on Windows, as
NTFS reparse points require backslashes.
- Normalize readlink output to native path separators to match preferred
style.

This fixes the following test failure:

```
PS C:\src\chromium\src\third_party\llvm> .\build_repro\unittests\Support\SupportTests.exe --gtest_filter=FileSystemTest.CreateRelativeDirectorySymlink
[ RUN      ] FileSystemTest.CreateRelativeDirectorySymlink
Test Directory: C:/src/temp/file-system-test-a3fd42
C:\src\chromium\src\third_party\llvm\llvm\unittests\Support\Path.cpp(896): error: Value of: fs::is_directory(Link)                                                                                                                                                                                                                     Actual: false
Expected: true
```
DeltaFile
+2-1llvm/lib/Support/Windows/Path.inc
+2-11 files

LLVM/project 14d9c0cllvm/test/MC/ARM cde-integer.s mve-load-store.s, llvm/utils/TableGen AsmMatcherEmitter.cpp

[AsmMatcher] Report a near-miss when all candidates mismatch multiple operands (#206390)

In the ReportMultipleNearMisses path, an opcode that mismatches more
than one operand is dropped, and its first near-miss is dropped with it. If
every opcode is dropped this way, the parser only reports a generic
"invalid instruction".

Now keep the first near-miss of each such opcode, and use it only when
no other opcode gives a near-miss.

Assisted-by: claude-opus
DeltaFile
+25-25llvm/test/MC/ARM/cde-integer.s
+16-16llvm/test/MC/ARM/mve-load-store.s
+21-1llvm/utils/TableGen/AsmMatcherEmitter.cpp
+10-10llvm/test/MC/ARM/bfloat16-a32-errors2.s
+8-8llvm/test/MC/ARM/mve-misc.s
+8-8llvm/test/MC/ARM/diagnostics.s
+88-6813 files not shown
+129-11019 files

LLVM/project 483d534llvm/include/llvm/TargetParser SubtargetFeature.h, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

[TargetParser][NFC] Make FeatureBitset iterable (#206394)

FeatureBitset had no way to iterate its bits, so callers scanned all
MAX_SUBTARGET_FEATURES positions by hand.
This adds begin()/end() that yield the index of each set bit, skipping
unset bits with countr_zero.
Callers can now write `for (unsigned Feature: Features)`. 

Assisted-by: claude-opus
DeltaFile
+40-0llvm/include/llvm/TargetParser/SubtargetFeature.h
+31-0llvm/unittests/TargetParser/TargetParserTest.cpp
+4-6llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+4-6llvm/lib/Target/LoongArch/AsmParser/LoongArchAsmParser.cpp
+3-5llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
+3-5llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+85-222 files not shown
+89-298 files

LLVM/project 76c92eclldb/test/API/functionalities/breakpoint/breakpoint_conditions/crashing_condition TestCrashingCondition.py, lldb/test/API/lang/cpp/default-template-args TestDefaultTemplateArgs.py

[lldb][test] Skip more unsupported tests on WebAssembly (#206857)

These tests exercise functionality that WebAssembly does not provide, so
they cannot pass under the Wasm test configuration. The reasons vary by
test, captured by a short inline comment.

Skip them with @skipIfWasm (and @skipIfNoSignals for the SIGINT test) so
the suite reflects real failures.
DeltaFile
+2-0lldb/test/API/functionalities/breakpoint/breakpoint_conditions/crashing_condition/TestCrashingCondition.py
+1-0lldb/test/API/lang/cpp/default-template-args/TestDefaultTemplateArgs.py
+1-0lldb/test/API/macosx/mte/TestDarwinMTE.py
+1-0lldb/test/API/python_api/global_module_cache/TestGlobalModuleCache.py
+1-0lldb/test/API/python_api/sbenvironment/TestSBEnvironment.py
+1-0lldb/test/API/python_api/sbplatform/TestSBPlatform.py
+7-033 files not shown
+40-039 files

LLVM/project 6a2cd1flibc/cmake/modules LLVMLibCArchitectures.cmake

[libc] Support triples that start with thumb*- (#206847)

thumb*- can be used as an alias for arm*- (implying -mthumb).
DeltaFile
+1-1libc/cmake/modules/LLVMLibCArchitectures.cmake
+1-11 files

LLVM/project c311656clang/lib/CodeGen CodeGenModule.cpp, clang/test/CodeGen call-graph-section.cpp call-graph-section-templates.cpp

[clang][llvm]Uncorrelate CFI and Callgraph related type metadata annotations (#204266)

When -fexperimental-call-graph-section flag is set, it adds type
metadata to all the functions whose addresses are taken and does not
have local linkage. When this flag is set along with CFI, the type
metadata is added to all the vtable functions including destructors.
This changes which functions are to be treated as CFI functions and
includes such vtable entries to become part of the CFI check jumptables.

To disambiguate intentions of CFI and callgraph mechanisms, this patch
renames metadata set by callgraph mechanism to !callgraph
(MD_callgraph). This prevents inflating the list of CFI functions when
callgraph section is enabled along with CFI.
DeltaFile
+72-1llvm/docs/LangRef.rst
+28-28clang/test/CodeGen/call-graph-section.cpp
+21-21clang/test/CodeGen/call-graph-section-templates.cpp
+0-33llvm/docs/CalleeTypeMetadata.rst
+11-21clang/lib/CodeGen/CodeGenModule.cpp
+15-15clang/test/CodeGen/call-graph-section.c
+147-11945 files not shown
+351-28651 files

LLVM/project 80723e0llvm/lib/Target/LoongArch LoongArchISelLowering.cpp LoongArchISelLowering.h, llvm/test/CodeGen/LoongArch/ir-instruction double-convert.ll float-convert.ll

Reland: [LoongArch] Custom scalar UINT_TO_FP and FP_TO_UINT with LSX instructions (#206655)

Using `vftintrz.lu.d` for converting scalar double/float values to
unsigned 64-bit integers, and `vffint.d.lu` vice versa.

Remove incorrect uint64 to float conversion, which is suffered
from double-rounding issue.
DeltaFile
+49-2llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+7-26llvm/test/CodeGen/LoongArch/ir-instruction/double-convert.ll
+3-14llvm/test/CodeGen/LoongArch/ir-instruction/float-convert.ll
+1-0llvm/lib/Target/LoongArch/LoongArchISelLowering.h
+60-424 files

LLVM/project e2fc1e7llvm/lib/Target/LoongArch LoongArchISelLowering.cpp LoongArchISelLowering.h, llvm/test/CodeGen/LoongArch set-rounding.ll isel-set-invalid-rounding.ll

[LoongArch] Support ISD::SET_ROUNDING (llvm.set.rounding) (#206395)

Fix https://github.com/llvm/llvm-project/issues/205039.

The LoongArch FCSR RM field supports four rounding modes, whose
encodings differ from LLVM's rounding mode values:
  FCSR: 0=RNE, 1=RZ,  2=RP,  3=RM
  LLVM: 0=RTZ, 1=RNE, 2=RUP, 3=RDN

For LLVM rounding mode 4, round to nearest with ties away from zero,
diagnose an error when it is a constant.

---------

Co-authored-by: tangyuan0821 <tangyuan0821 at email.cn>
DeltaFile
+75-0llvm/test/CodeGen/LoongArch/set-rounding.ll
+60-0llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+12-0llvm/test/CodeGen/LoongArch/isel-set-invalid-rounding.ll
+1-0llvm/lib/Target/LoongArch/LoongArchISelLowering.h
+148-04 files

LLVM/project a282899flang/test/Driver linker-options.f90

fixup! [Clang] Switch to Default PIE on FreeBSD
DeltaFile
+8-8flang/test/Driver/linker-options.f90
+8-81 files

LLVM/project 6df6a33flang/test/Driver linker-options.f90

fixup! [clang] Rename CLANG_DEFAULT_PIE_ON_LINUX to CLANG_DEFAULT_PIE
DeltaFile
+8-8flang/test/Driver/linker-options.f90
+8-81 files

LLVM/project 0a70352flang/test/Driver linker-options.f90

fixup! [clang] Rename CLANG_DEFAULT_PIE_ON_LINUX to CLANG_DEFAULT_PIE
DeltaFile
+8-8flang/test/Driver/linker-options.f90
+8-81 files

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

[AMDGPU] Introduce ABI occupancy for object linking

This PR introduces ABI occupancy as the contract used to compile functions under
object linking. The default is derived from the occupancy needed for a 1024
workitem workgroup, can be overridden with `-amdgpu-abi-waves-per-eu`, and can
be overridden per function by `amdgpu-flat-work-group-size` or tightened by an
accepted `amdgpu-waves-per-eu` hint.

The backend emits the selected occupancy in `.amdgpu.info` and uses it to
enforce the object linking register budget.
DeltaFile
+67-35llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+56-7llvm/docs/AMDGPUUsage.rst
+34-3llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.cpp
+32-2llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+34-0llvm/test/CodeGen/AMDGPU/object-linking-abi-occupancy-preserves-attr.ll
+31-0llvm/test/CodeGen/AMDGPU/object-linking-abi-occupancy-kernel-no-attr.ll
+254-4715 files not shown
+446-4821 files

LLVM/project e62ce24lld/ELF AMDGPUObjectLinking.cpp, lld/test/ELF amdgpu-lds-link-time-ordering-multigroup.s amdgpu-lds-link-time-random-layout.s

[RFC][AMDGPU][lld] Add object linking support

Add AMDGPU ELF object-linking support in lld, including resource propagation,
LDS layout, indirect-call handling, named-barrier updates, target compatibility
checks, and kernel descriptor/metadata patching.

This is a large PR because the linker needs to understand and validate several
AMDGPU object-linking concepts end to end. I tried to keep the changes scoped to
the necessary linker support and related metadata plumbing, but I'm open to
suggestions on how to split or structure the review to make it easier.
DeltaFile
+1,914-0lld/ELF/AMDGPUObjectLinking.cpp
+505-0lld/test/ELF/amdgpu-lds-link-time-ordering-multigroup.s
+432-0lld/test/ELF/amdgpu-lds-link-time-random-layout.s
+425-0lld/test/ELF/amdgpu-lds-link-time-grouped.s
+402-0lld/test/ELF/amdgpu-lds-link-time-ordering-complex.s
+400-0lld/test/ELF/amdgpu-resource-usage.s
+4,078-044 files not shown
+9,698-450 files

LLVM/project c7e2809clang/lib/Sema SemaInit.cpp SemaExpr.cpp, clang/test/AST/HLSL ConstantBuffers-AST.hlsl ConstantBuffers-AST-error.hlsl

[HLSL] Enable conversion of ConstantBuffer<T> to T (#205996)

HLSL allows assigning a `ConstantBuffer<T>` to an object of type `T`.
This change adds support for this.

Fixes #195093
DeltaFile
+255-0clang/test/CodeGenHLSL/resources/ConstantBufferT-struct-passing.hlsl
+31-0clang/test/AST/HLSL/ConstantBuffers-AST.hlsl
+29-1clang/lib/Sema/SemaInit.cpp
+0-24clang/test/AST/HLSL/ConstantBuffers-AST-error.hlsl
+0-23clang/test/CodeGenHLSL/cbuffer_copy_layout.hlsl
+14-4clang/lib/Sema/SemaExpr.cpp
+329-526 files not shown
+344-6312 files

LLVM/project f9f4331libc/shared builtins.h, libc/shared/builtins muldf3.h

[libc] add shared muldf3 builtin (#205674)

Re-exposes LLVM-libc's `__muldf3` as `shared::muldf3` for reuse by
compiler-rt's builtins.

Stacked change - merge these first:
- #200094
- #205669
- #205670
- #205671
- #205672
- #205673

Part of #197824
DeltaFile
+32-0libc/src/__support/builtins/muldf3.h
+29-0libc/shared/builtins/muldf3.h
+9-0libc/src/__support/builtins/CMakeLists.txt
+1-0libc/shared/builtins.h
+1-0libc/test/shared/CMakeLists.txt
+1-0libc/test/shared/shared_builtins_test.cpp
+73-06 files

LLVM/project 443d933libunwind/src Unwind-wasm.c

[libunwind] Fix comment about phase (NFC) (#206660)

We switched to use `_UA_SEARCH_PHASE` in
https://github.com/emscripten-core/emscripten/pull/17991, but the
comment above was not fixed, and it was upstreamed that way later.
DeltaFile
+1-1libunwind/src/Unwind-wasm.c
+1-11 files

LLVM/project bc59f8fllvm/lib/ExecutionEngine/Orc InProcessEPC.cpp

[ORC] Add missing std::move. (#206859)

This should fix the build failure at
https://lab.llvm.org/buildbot/#/builders/116/builds/29995.
DeltaFile
+1-1llvm/lib/ExecutionEngine/Orc/InProcessEPC.cpp
+1-11 files

LLVM/project 3f92b6bllvm/lib/Target/AArch64/Disassembler AArch64Disassembler.cpp, llvm/lib/Target/AArch64/MCTargetDesc AArch64InstPrinter.cpp

fixup! Small improvement
DeltaFile
+1-3llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
+1-1llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+2-42 files

LLVM/project fe80adelibcxx/test/std/containers/views/mdspan/extents bitint.pass.cpp, libcxx/test/std/language.support/support.limits/limits/numeric.limits.members min.pass.cpp digits10.pass.cpp

[libc++][test][NFC] Remove implementation-detail noise from _BitInt test comments (#206666)

Several `_BitInt` test comments named the builtin the code lowers to,
restated macro equivalences, or pointed at another test file's
internals. They read as machine-generated and do not help a reader. This
rewords them across the `_BitInt` tests touched by #203876, where the
pattern was flagged in review.

Assisted-by: Claude (Anthropic)

Co-authored-by: Claude Opus 4.6 <noreply at anthropic.com>
DeltaFile
+10-30libcxx/test/std/utilities/utility/utility.intcmp/intcmp.bitint.pass.cpp
+9-20libcxx/test/std/numerics/bit/byteswap.pass.cpp
+4-8libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturating.bitint.pass.cpp
+3-8libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp
+4-7libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp
+3-6libcxx/test/std/containers/views/mdspan/extents/bitint.pass.cpp
+33-798 files not shown
+44-10114 files

LLVM/project 475bc04libcxx/include set, libcxx/test/std/containers/associative/set iterator.pass.cpp merge.pass.cpp

[libc++] Make `<set>` `std::set` constexpr as part of P3372R3 (#167241)
DeltaFile
+161-91libcxx/include/set
+20-16libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp
+20-13libcxx/test/std/containers/associative/set/iterator.pass.cpp
+20-13libcxx/test/std/containers/associative/set/set.nonmember/op_compare.pass.cpp
+19-11libcxx/test/std/containers/associative/set/merge.pass.cpp
+27-0libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+267-14471 files not shown
+934-35177 files

LLVM/project f89b1ecllvm/lib/Target/AArch64/Disassembler AArch64Disassembler.cpp

fixup! Small improvement
DeltaFile
+1-3llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
+1-31 files

LLVM/project 4d9875eclang/include/clang/ScalableStaticAnalysis/Analyses/OperatorNewDelete OperatorNewDeletePointers.h, clang/lib/ScalableStaticAnalysis/Analyses SSAFAnalysesCommon.h

address comments
DeltaFile
+33-34clang/lib/ScalableStaticAnalysis/Analyses/OperatorNewDelete/OperatorNewDeletePointersExtractor.cpp
+16-14clang/include/clang/ScalableStaticAnalysis/Analyses/OperatorNewDelete/OperatorNewDeletePointers.h
+1-1clang/lib/ScalableStaticAnalysis/Analyses/SSAFAnalysesCommon.h
+50-493 files

LLVM/project 9a725a7lldb/source/Plugins/ObjectFile/wasm ObjectFileWasm.cpp

[lldb] Create a BSS section for WebAssembly object files (#206840)

Zero-initialized globals (BSS) live in a module's linear memory above
the initialized data segments, but wasm-ld emits no data segment for
them, so ObjectFileWasm created no section covering their addresses.
Reading those global without a running process fails with "unable to
resolve the module for file address", because the address resolved to no
section. Live reads did work because they go through process memory.

Synthesize a zero-fill section spanning from the end of the initialized
data to the linear memory's minimum size, and map it into linear memory
like the data segments. Live reads keep going through process memory
while zero-fill reads return zero.
DeltaFile
+58-5lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
+58-51 files

LLVM/project 8de3799clang/lib/ScalableStaticAnalysis/Analyses SSAFAnalysesCommon.h

Update clang/lib/ScalableStaticAnalysis/Analyses/SSAFAnalysesCommon.h

Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
DeltaFile
+1-1clang/lib/ScalableStaticAnalysis/Analyses/SSAFAnalysesCommon.h
+1-11 files

LLVM/project 1f7a93dlldb/source/Plugins/ABI/X86 ABIX86.cpp ABIX86_i386.h

[lldb][Windows] Fix "Invalid register name" for eax on x86_64 attach (#203498)

On Windows, when attaching to a process with no pre-existing target,
lldb reports "Invalid register name" for sub-registers like eax.

This is due to a bug in `ABIX86::AugmentRegisterInfo`, which determines
the GPR base size by reading
`Target::GetArchitecture().GetAddressByteSize()`. During attach, the
target's architecture has not yet been set when `AugmentRegisterInfo`
runs, so the lookup returns 0, the process is treated as 32-bit, and the
x86_64 sub-registers are never added.

This patch removes the dependency on the target's architecture: the X86
ABI plugins already know their own bitness, so `ABIX86_64` and
`ABIX86_i386` now report it directly via a new `Is64Bit()` virtual.

This patch fixes
`TestRegisters::test_convenience_registers_with_process_attach` and
`TestRegisters::test_convenience_registers_16bit_with_process_attach` on

    [2 lines not shown]
DeltaFile
+2-3lldb/source/Plugins/ABI/X86/ABIX86.cpp
+3-0lldb/source/Plugins/ABI/X86/ABIX86_i386.h
+2-0lldb/source/Plugins/ABI/X86/ABIX86_64.h
+2-0lldb/source/Plugins/ABI/X86/ABIX86.h
+9-34 files