LLVM/project f4b99f3 — llvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor heap_to_stack_gpu.ll heap_to_stack.ll

Attributor: Clear tail markers after heap-to-stack (#231611)

A tail call cannot access the allocas of its caller. AAHeapToStack
replaced heap allocations with allocas but kept the tail markers on the
calls using them, so alias analysis treated those calls as not accessing
the new allocas. This miscompiled tramp3d-v4 with the full Attributor.

Clear the tail markers in functions where allocations were moved to
the stack, as AAPrivatizablePtr already does for privatized arguments.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+30-12llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+13-13llvm/test/Transforms/Attributor/heap_to_stack.ll
+26-0llvm/test/Transforms/Attributor/heap_to_stack_tail_call.ll
+3-3llvm/test/Transforms/Attributor/heap_to_stack_gpu.ll
+72-284 files

LLVM/project fae51e8 — clang/lib/Headers riscv_packed_simd.h, clang/test/CodeGen/RISCV rvp-intrinsics.c

[Clang][RISCV] Add scalar widening zip intrinsics (#238758)

Add the scalar Bitmanip intrinsics `__riscv_wzip8p_64` and
`__riscv_wzip16p_64` using the existing packed zip intrinsics.
DeltaFile
+48-0clang/test/CodeGen/RISCV/rvp-intrinsics.c
+14-0cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c
+11-0clang/lib/Headers/riscv_packed_simd.h
+73-03 files

LLVM/project ffc8376 — llvm/lib/CodeGen/GlobalISel MachineIRBuilder.cpp, llvm/test/CodeGen/AArch64/GlobalISel irtranslator-debug-instr-metadata.ll

[GlobalISel] Do not attach instruction metadata to debug instructions (#232607)

`MachineIRBuilder` retains PC-section and MMRA metadata while lowering
an IR instruction so that the ordinary MachineInstrs produced from it
can inherit the metadata. Debug records are translated before their
attached instruction, so the builder can still contain metadata from the
preceding instruction.

`buildFIDbgValue`, `buildConstDbgValue`, and `buildDbgLabel` used the
general instruction-building path and therefore copied that stale state
to `DBG_VALUE` and `DBG_LABEL` instructions. This can produce spurious
PC-section entries and incorrectly attach MMRA metadata to debug
instructions.

Construct these debug instructions with only their debug locations,
matching the existing direct and indirect `DBG_VALUE` helpers. The
regression test checks constant and frame-index debug values and a debug
label, while also verifying that the ordinary instruction still retains
its PC-section and MMRA metadata.

    [5 lines not shown]
DeltaFile
+41-0llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-debug-instr-metadata.ll
+9-7llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
+50-72 files

LLVM/project a6ae27e — llvm/lib/Transforms/Scalar ConstraintElimination.cpp, llvm/test/Transforms/ConstraintElimination sadd-with-overflow.ll minmax.ll

[ConstraintElim] Split signed min/max across their operands when checking a compare

The existing constraint systems only record the bounds that hold for both
operands of a min/max (smax(a, b) >= a and >= b, smin(a, b) <= a and <= b). The
other direction is a disjunction, which cannot be recorded as a fact. When a
compare of signed decompositions involves a min/max result, split it into its
operands: the decomposition is monotonic in that result, so it is the max or min
of its values on each side, and the relation holds for all or for either side
respectively.

https://alive2.llvm.org/ce/z/zsGkJ-
DeltaFile
+366-3llvm/test/Transforms/ConstraintElimination/minmax.ll
+111-0llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+4-8llvm/test/Transforms/ConstraintElimination/sadd-with-overflow.ll
+481-113 files

LLVM/project 82eda05 — llvm/lib/Transforms/Scalar ConstraintElimination.cpp, llvm/test/Transforms/ConstraintElimination add-nsw.ll sadd-with-overflow.ll

[ConstraintElim] A signed sum of operands with opposite signs cannot wrap

If one operand is known non-negative and the other non-positive, the signed
sum is between them, so it cannot overflow.

https://alive2.llvm.org/ce/z/ZF5Yqr
DeltaFile
+97-2llvm/test/Transforms/ConstraintElimination/sadd-with-overflow.ll
+19-0llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+3-6llvm/test/Transforms/ConstraintElimination/add-nsw.ll
+119-83 files

LLVM/project e516bed — llvm/test/Transforms/ConstraintElimination ssub-with-overflow.ll

add ssub tests
DeltaFile
+100-0llvm/test/Transforms/ConstraintElimination/ssub-with-overflow.ll
+100-01 files

LLVM/project 43fa541 — llvm/lib/Transforms/Scalar ConstraintElimination.cpp

clang-format
DeltaFile
+1-2llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+1-21 files

LLVM/project beea7f3 — llvm/lib/Transforms/Scalar ConstraintElimination.cpp, llvm/test/Transforms/ConstraintElimination sadd-with-overflow.ll

[ConstraintElim] Prove sadd/ssub.with.overflow cannot overflow from the exact sum

Decompose the operands and show that the sum lies in the range of the type. This
handles patterns like A + (B - A), as well as sums involving signed min/max
results, which are split across their respective operands using monotonicity
(for example start + smax(end - start - 1, 0) <= end).

https://alive2.llvm.org/ce/z/ze8LCk
DeltaFile
+539-0llvm/test/Transforms/ConstraintElimination/sadd-with-overflow.ll
+160-3llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+699-32 files

LLVM/project 90a9552 — clang-tools-extra/clang-tidy/modernize UseEmplaceCheck.cpp, clang-tools-extra/docs ReleaseNotes.md

[clang-tidy] Ignore 0 and NULL null pointers in modernize-use-emplace (#237770)

The check rewrites
```
v.push_back(T(42, 0));
```
where the second parameter of the constructor of `T` is a pointer, to
`v.emplace_back(42, 0)`. The forwarding reference of `emplace_back`
deduces `0` as an `int`, which, unlike the literal, does not convert to
a pointer, so the rewritten call does not compile. `NULL`, which is
`__null` or an integer literal, has the same problem, as does a literal
zero passed for a pointer to member.

Ignore such calls, as the check already does for bit-field arguments,
and remove the FIXME about them. `nullptr` is deduced as
`std::nullptr_t`, which converts to any pointer, so calls passing it are
still reported.

Assisted-by: Claude Opus 5.5

    [3 lines not shown]
DeltaFile
+86-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace.cpp
+12-4clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp
+5-0clang-tools-extra/docs/ReleaseNotes.md
+3-0clang-tools-extra/docs/clang-tidy/checks/modernize/use-emplace.rst
+106-44 files

LLVM/project 73027d8 — clang-tools-extra/clang-tidy/misc IncludeCleanerCheck.cpp, clang-tools-extra/docs ReleaseNotes.md

[clang-tidy] Match IgnoreHeaders against slash-normalized paths in misc-include-cleaner (#237924)

On Windows, `misc-include-cleaner` matches `IgnoreHeaders` regexes
against `tryGetRealPathName()`, which returns a backslashed path in MSVC
builds. Patterns containing `/` therefore never match there.

This patch matches each pattern against both the original path and the
path converted with `llvm::sys::path::convert_to_slash` to fix the
issue.

Fixes #237692
DeltaFile
+15-0clang-tools-extra/unittests/clang-tidy/IncludeCleanerTest.cpp
+4-2clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp
+5-0clang-tools-extra/docs/ReleaseNotes.md
+24-23 files

LLVM/project baf1b9f — llvm/lib/Transforms/Scalar ConstraintElimination.cpp

reuse known bits result with WithCache

The overloads feel like a bit of a hack, but we need them because ValueTracking
is much more strict about const than ConstraintElimination, and where we'd want
automatic conversion from WithCache<Value*>& to WithCache<const Value*>& we
can't even do it manually. See: https://github.com/llvm/llvm-project/pull/235158#discussion_r4449759101
DeltaFile
+25-13llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+25-131 files

LLVM/project dcac7b6 — lld/COFF Driver.cpp, lld/test/COFF winsysroot.test

[LLD][COFF] Retry pathStr directly in LinkerDriver::enqueuePath before findFileIfNew (#230249)

On Windows XLA CI builds, lld-link occasionally fails with hundreds of
undefined symbol errors for symbols defined in an object file that was
passed on the linker command line, without reporting any error opening
that object file.

Before calling LinkerDriver::enqueuePath, callers check findFileIfNew or
findLibIfNew. If the input file already exists on disk, findFileIfNew
records the file's unique ID in visitedFiles so the same file is not
linked twice.

On 64-bit Windows, enqueuePath opens the file asynchronously via
createFutureForFile. When the main thread later calls future->get(), if
that initial open failed (for example, due to a transient file-sharing
error on Windows when many async tasks open files concurrently, or when
an existing file lacks read permissions), enqueuePath enters its
fallback path.


    [16 lines not shown]
DeltaFile
+33-20lld/COFF/Driver.cpp
+6-0lld/test/COFF/winsysroot.test
+39-202 files

LLVM/project d70f6cd — lldb/source/Plugins/Process/Utility RegisterContextDarwin_x86_64.cpp RegisterContextDarwin_riscv32.cpp, lldb/source/Plugins/Register/Darwin RegisterContextDarwin_x86_64.cpp RegisterContextDarwin_riscv32.cpp

Merge branch 'main' into users/jebyrnes/vassrcsdst
DeltaFile
+0-1,738lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
+1,738-0lldb/source/Plugins/Register/Darwin/RegisterContextDarwin_arm.cpp
+0-1,313lldb/source/Plugins/Process/Utility/RegisterContextDarwin_riscv32.cpp
+1,313-0lldb/source/Plugins/Register/Darwin/RegisterContextDarwin_riscv32.cpp
+0-1,051lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
+1,051-0lldb/source/Plugins/Register/Darwin/RegisterContextDarwin_x86_64.cpp
+4,102-4,102143 files not shown
+8,776-8,570149 files

LLVM/project 04df8c1 — llvm/lib/Target/AArch64 AArch64.h AArch64SLSHardening.cpp

[AArch64] Use a single inserter in AArch64SLSHardeningPass

We need to keep the Thunks list as state inside the inserter or
otherwise we will try and insert duplicate functions which will insert a
function with an incorrect name (e.g., .1 suffix).

Reviewers: davemgreen, aeubanks, kbeyls

Pull Request: https://github.com/llvm/llvm-project/pull/238481
DeltaFile
+14-5llvm/lib/Target/AArch64/AArch64SLSHardening.cpp
+7-0llvm/lib/Target/AArch64/AArch64.h
+21-52 files

LLVM/project 64a4da7 — clang/docs BoundsSafety.md, clang/docs/BoundsSafety BoundsSafety.md

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1,140-10llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll
+5-967clang/docs/BoundsSafety.md
+969-0clang/docs/BoundsSafety/BoundsSafety.md
+338-338llvm/test/CodeGen/WebAssembly/atomic-mem-consistency.ll
+506-0llvm/lib/Target/DirectX/DXILContainerGlobals.cpp
+0-467llvm/lib/Target/DirectX/DXContainerGlobals.cpp
+2,958-1,782556 files not shown
+14,618-6,696562 files

LLVM/project 09b7910 — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls armpl.ll

RuntimeLibcalls: Add signatures for vector stret libcalls

The vector modf, sincos and sincospi stret functions return a pair of
vectors, so describe them with a struct of two vectors.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+12-12llvm/test/Transforms/Util/DeclareRuntimeLibcalls/armpl.ll
+5-3llvm/include/llvm/IR/RuntimeLibcalls.td
+17-152 files

LLVM/project 01ee6d3 — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/lib/IR RuntimeLibcalls.cpp

RuntimeLibcalls: Add signatures for the divrem libcalls

Add struct types to the signature table so libcalls returning multiple
values can be described in TableGen. Use them for the ARM, Windows and
AVR divmod functions, which return the quotient and remainder in
registers, instead of building their types in C++.

The other divrem libcalls use the compiler-rt prototype, which stores
the remainder through a pointer. AVR gets its own __divmodsi4 and
__udivmodsi4, since ARM Darwin uses the compiler-rt functions with
those names.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+21-47llvm/lib/IR/RuntimeLibcalls.cpp
+41-18llvm/include/llvm/IR/RuntimeLibcalls.td
+44-0llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
+10-10llvm/test/Transforms/Util/DeclareRuntimeLibcalls/divmod.ll
+8-8llvm/test/Transforms/Util/DeclareRuntimeLibcalls/arm.ll
+15-0llvm/test/TableGen/RuntimeLibcallEmitter.td
+139-832 files not shown
+151-898 files

LLVM/project 6a4812c — llvm/lib/Target/RISCV/MCTargetDesc RISCVTargetStreamer.cpp RISCVBaseInfo.h

[RISCV] Use a fully covered switch in RISCVABI::getStackAlignment.

This makes it more obvious the alignment has been chosen explicitly
for every ABI.

Not quite NFC because we no longer emit the stack align attribute for
an unknown ABI.
DeltaFile
+22-4llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
+1-1llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
+23-52 files

LLVM/project e584407 — llvm/include/llvm/CodeGen MachineDominanceFrontier.h, llvm/lib/CodeGen MachineDominanceFrontier.cpp

CodeGen: Compute the machine dominance frontier lazily (#239029)

The legacy pass eagerly computed the frontier whenever a pass required
it. X86 LVI load hardening always required it but returned immediately
unless the lvi-load-hardening feature is enabled, so this was computed
and thrown away in the default case. Record the dominator tree when
the wrapper runs and compute the frontier the first time it is
requested.

Instructions retired for llc -O3 -filetype=null over the 10 CTMark
programs as x86_64 full-LTO modules:

  total             -0.26%
  ClamAV            -0.47%
  7zip              -0.41%
  consumer-typeset  -0.32%
  SPASS             -0.31%
  sqlite3           -0.29%

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+11-3llvm/lib/CodeGen/MachineDominanceFrontier.cpp
+5-1llvm/include/llvm/CodeGen/MachineDominanceFrontier.h
+16-42 files

LLVM/project da18671 — llvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor value-simplify-local-remote.ll read_write_returned_arguments_scc.ll

Attributor: Require willreturn to skip capture checks for readonly functions (#231616)

AANoCapture assumed that a function which only reads memory, does not
unwind, and does not return a value cannot capture its arguments,
without looking at the uses. However, such a function can still capture
the address by whether it returns, e.g. by recursing forever if a
pointer is null. FunctionAttrs also requires willreturn for this.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+30-30llvm/test/Transforms/Attributor/returned.ll
+29-8llvm/test/Transforms/Attributor/nocapture-2.ll
+35-0llvm/test/Transforms/Attributor/nocapture-readonly-willreturn.ll
+12-5llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+6-6llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
+3-4llvm/test/Transforms/Attributor/value-simplify-local-remote.ll
+115-538 files not shown
+130-6814 files

LLVM/project 3fb3112 — utils/bazel/llvm-project-overlay/lldb/source/Plugins BUILD.bazel

[Bazel] Fixes 4ba2a94 (#239048)

This fixes 4ba2a94856ed42091c69cbc5ac4ba42f51124e86 (#237400).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=4ba2a94856ed42091c69cbc5ac4ba42f51124e86

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+19-0utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel
+19-01 files

LLVM/project eeb24ee — lldb/source/Plugins/Process/Utility RegisterContextPOSIX_powerpc.cpp RegisterContextPOSIX_ppc64le.cpp, lldb/source/Plugins/Register/Core RegisterContextCore_powerpc.cpp RegisterContextCore_ppc64le.cpp

[lldb] Extract reusable core register contexts (#237442)

As part of RegisterInfo/RegisterContext refactoring under
Process/Utility, move RegisterContextPOSIX to
Plugins/Register/Core/RegisterContextCore. The renaming is necessary
because RegisterContextPOSIX doesn't use any POSIX APIs, so the term is
misleading (e.g. FreeBSD-Kernel-Core does not have any relationship with
POSIX except that the FreeBSD operating system itself is compatible with
POSIX). Although RegisterContextPOSIX doesn't do coredump-specific
operations, only elf-core and FreeBSD-Kernel-Core depend on it and
that's the only naming I could justify (Names like Unix and Common don't
fit in this case). We can change the name later when non-coredump
process plugin depends on it, but the probability is low considering
that NativeRegisterContext and RegisterContextDarwin/Mach already cover
what we need.
DeltaFile
+0-342lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp
+342-0lldb/source/Plugins/Register/Core/RegisterContextCore_x86.cpp
+0-183lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp
+183-0lldb/source/Plugins/Register/Core/RegisterContextCore_ppc64le.cpp
+0-164lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp
+164-0lldb/source/Plugins/Register/Core/RegisterContextCore_powerpc.cpp
+689-68970 files not shown
+2,086-2,05876 files

LLVM/project 6e3a66b — llvm/include/llvm/TargetParser IntelGPUTargetParser.h, llvm/lib/TargetParser IntelGPUTargetParser.cpp

[TargetParser] Map an Intel GPU to its IGCA target (#238917)

Map an Intel GPU to its IGCA target.

Each Intel GPU in `IntelGPUTargetParser.def` lists its IGCA target, e.g.
`igca_30r` for both `xe-mtl-u` and `xe-mtl-h`, but nothing could read it
out.

This PR adds `llvm::IntelGPU::getIGCATarget(GPUKind)`, which returns the
IGCA target that `IntelGPUTargetParser.def` lists for an Intel GPU, e.g.
igca_30r for xe-mtl-u, or an invalid IGCA target for `GK_NONE`.

It is the first step towards compiling device code once per IGCA target:
with `--offload-arch=xe-mtl-u,xe-mtl-h`, the driver will compile once
for `igca_30r` instead of once per device.
DeltaFile
+16-0llvm/unittests/TargetParser/IntelGPUTargetParserTest.cpp
+15-0llvm/lib/TargetParser/IntelGPUTargetParser.cpp
+4-0llvm/include/llvm/TargetParser/IntelGPUTargetParser.h
+35-03 files

LLVM/project e6dfddb — llvm/lib/Transforms/Scalar ConstraintElimination.cpp

don't add redundant facts
DeltaFile
+14-10llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+14-101 files

LLVM/project d0c7fc1 — llvm/lib/Transforms/Scalar ConstraintElimination.cpp, llvm/test/Transforms/ConstraintElimination transfer-samesign-facts.ll

add ConstraintInfo::isKnownNegative for symmetry
DeltaFile
+48-0llvm/test/Transforms/ConstraintElimination/transfer-samesign-facts.ll
+12-1llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+60-12 files

LLVM/project a889785 — llvm/lib/Transforms/Scalar ConstraintElimination.cpp, llvm/test/Transforms/ConstraintElimination transfer-samesign-facts.ll

[ConstraintElim] Propagate the sign across an icmp samesign

If one operand of `icmp samesign` is known (non-)negative, so is the other. Add
that as a fact in the signed system.

https://alive2.llvm.org/ce/z/xUgGRM
DeltaFile
+92-8llvm/test/Transforms/ConstraintElimination/transfer-samesign-facts.ll
+16-2llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+108-102 files

LLVM/project 9539553 — llvm/test/CodeGen/AMDGPU asyncmark-gfx12plus.ll reassoc-mul-add-1-to-mad.ll

Fix lit from rebase

Change-Id: I888ac13153295c1a0c5968c3bf2b9ad02de08159
DeltaFile
+305-305llvm/test/CodeGen/AMDGPU/load-constant-i1.ll
+110-87llvm/test/CodeGen/AMDGPU/packed-fp64.ll
+69-68llvm/test/CodeGen/AMDGPU/load-constant-i32.ll
+53-49llvm/test/CodeGen/AMDGPU/atomic_optimizations_local_pointer.ll
+31-30llvm/test/CodeGen/AMDGPU/reassoc-mul-add-1-to-mad.ll
+30-30llvm/test/CodeGen/AMDGPU/asyncmark-gfx12plus.ll
+598-5697 files not shown
+663-63513 files

LLVM/project 2567621 — clang/include/clang/Sema DeclSpec.h

[NFC] Format DeclSpec.h
DeltaFile
+642-639clang/include/clang/Sema/DeclSpec.h
+642-6391 files

LLVM/project 5e729f9 — llvm/lib/Target/AMDGPU GCNHazardRecognizer.cpp

Review comments

Change-Id: I51b32587fbb9d6f63080a1e2449365386d911d8d
DeltaFile
+8-23llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
+8-231 files

LLVM/project b5bbdc9 — llvm/test/TableGen AsmMatcherTokens.td, llvm/utils/TableGen AsmMatcherEmitter.cpp

[TableGen] Always use `AsmParserClassName` in `AsmMatcherEmitter` (#238682)

Parser class name is customizable, emit correct class name.
DeltaFile
+17-9llvm/utils/TableGen/AsmMatcherEmitter.cpp
+8-1llvm/test/TableGen/AsmMatcherTokens.td
+25-102 files