LLVM/project e6d6ef7 — libcxx/include/__algorithm pstl.h, libcxx/include/__pstl backend_fwd.h

[libc++][pstl] Add one-liner implementations of std::remove_copy and std::remove_copy_if (#244161)

This PR implements PSTL versions of `std::remove_copy` and
`std::remove_copy_if` as one-liners in terms of `std::copy_if`.
`std::copy_if` will get a parallel implementation once #241966 is
merged, hence these 2 algorithms will be parallel as well.

Part of #99938.
DeltaFile
+220-0libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/pstl.remove_copy.pass.cpp
+211-0libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/pstl.remove_copy_if.pass.cpp
+46-0libcxx/include/__algorithm/pstl.h
+41-0libcxx/include/__pstl/backends/default.h
+16-0libcxx/include/__pstl/backend_fwd.h
+14-0libcxx/test/std/algorithms/pstl.exception_handling.pass.cpp
+548-02 files not shown
+566-08 files

LLVM/project 2da4bbc — clang/lib/Sema SemaExpr.cpp SemaCast.cpp

[clang] Fix compile-time regression from variably modified type checks (#244352)

Follow-up to #229697, which caused a compile-time regression even on
code without VLAs.

Check `getCanonicalType()->isVariablyModifiedType()` in the callers
first, and push the context in `sizeof` only for variably modified
types. No functional change intended.
DeltaFile
+13-9clang/lib/Sema/SemaDecl.cpp
+6-3clang/lib/Sema/SemaCast.cpp
+2-1clang/lib/Sema/SemaExpr.cpp
+21-133 files

LLVM/project 668fdeb — clang/lib/CodeGen CodeGenFunction.cpp, clang/test/CodeGen trivial-auto-var-init-bypass.c

[clang][CodeGen] Run Bypasses.Init() in StartFunction (#244723)

Move ShouldEmitLifetimeMarkers coroutine check and Bypasses.Init() from
CodeGenFunction::GenerateCode() into CodeGenFunction::StartFunction() so
non-FunctionDecl bodies (such as CapturedDecl, blocks, and ObjC methods)
also run bypass detection.

Add a regression test for CapturedDecl in
clang/test/CodeGen/trivial-auto-var-init-bypass.c.

Assisted-by: Gemini
DeltaFile
+50-0clang/test/CodeGen/trivial-auto-var-init-bypass.c
+13-14clang/lib/CodeGen/CodeGenFunction.cpp
+63-142 files

LLVM/project a6a1d12 — .github/workflows libc-freebsd-vm-tests.yml libc-overlay-tests.yml, cmake/Modules CMakePolicy.cmake

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+0-48cmake/Modules/CMakePolicy.cmake
+2-4.github/workflows/libc-overlay-tests.yml
+1-3.github/workflows/libc-freebsd-vm-tests.yml
+3-553 files

LLVM/project 765f72a — .github/workflows libc-overlay-tests.yml libc-freebsd-vm-tests.yml, cmake/Modules CMakePolicy.cmake

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+0-48cmake/Modules/CMakePolicy.cmake
+4-6.github/workflows/libc-freebsd-vm-tests.yml
+2-4.github/workflows/libc-overlay-tests.yml
+6-583 files

LLVM/project c440c14 — compiler-rt/lib/scudo/standalone combined.h primary32.h, compiler-rt/lib/scudo/standalone/tests combined_test.cpp

[scudo] Zero free blocks for zero on deallocate. (#244447)

When enabling ZeroFill and zero on deallocate is configured, zero all
allocations in the free list.

Add a test to verify that those freed allocations are zeroed.
DeltaFile
+52-2compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
+23-0compiler-rt/lib/scudo/standalone/primary64.h
+21-0compiler-rt/lib/scudo/standalone/primary32.h
+20-0compiler-rt/lib/scudo/standalone/combined.h
+116-24 files

LLVM/project cfb864f — clang/include/clang/Basic HLSLIntrinsics.td, clang/test/CodeGenHLSL/builtins fmod_mat.hlsl

[Matrix] Implement matrix support for the `fmod` intrinsic (#244440)

Closes #184481.

This PR implements the matrix api for `fmod` and adds matrix codegen
tests and matrix sema tests. Matrix backend tests were not added because
no DirectX or SPIRV backend changes were made.

Assisted-by: Claude Opus 5.5
DeltaFile
+68-0clang/test/CodeGenHLSL/builtins/fmod_mat.hlsl
+36-0clang/test/SemaHLSL/BuiltIns/fmod_mat-errors.hlsl
+2-2clang/test/SemaHLSL/BuiltIns/fmod-errors.hlsl
+1-1clang/include/clang/Basic/HLSLIntrinsics.td
+107-34 files

LLVM/project 61ca866 — .github/workflows libc-freebsd-vm-tests.yml libc-overlay-tests.yml

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+2-4.github/workflows/libc-overlay-tests.yml
+1-3.github/workflows/libc-freebsd-vm-tests.yml
+3-72 files

LLVM/project f0255fe — .github/workflows libc-freebsd-vm-tests.yml libc-overlay-tests.yml, cmake/Modules CMakePolicy.cmake

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+0-48cmake/Modules/CMakePolicy.cmake
+2-4.github/workflows/libc-overlay-tests.yml
+1-3.github/workflows/libc-freebsd-vm-tests.yml
+3-553 files

LLVM/project 9f6a4a0 — .github/workflows libc-freebsd-vm-tests.yml libc-overlay-tests.yml

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+2-4.github/workflows/libc-overlay-tests.yml
+1-3.github/workflows/libc-freebsd-vm-tests.yml
+3-72 files

LLVM/project 3007f6c — llvm/lib/CodeGen/AsmPrinter AsmPrinter.cpp, llvm/test/CodeGen/AMDGPU nullptr.ll

[AsmPrinter] Emit the data layout null value for null pointers

Currently `emitGlobalConstantImpl` emits a null pointer with `emitIntValue(0,
Size)`. This ignores the null value that the data layout can give an address
space (even though we have not reached the point where the ConstantPointerNull
can represent a real null pointer in certain address spaces), and `emitIntValue`
can only emit up to 8 bytes, so `llc` hits an assertion in `MCAsmStreamer` for a
null pointer of a wider address space in a global initializer, such as `ptr
addrspace(8) null` on AMDGPU. To be a little bit future proof, this PR emits the
null value of the data layout in the same way as an integer of the pointer size.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+15-0llvm/test/CodeGen/AMDGPU/nullptr.ll
+12-1llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+27-12 files

LLVM/project 8ef2fd0 — llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU addrspacecast-known-non-null-O0.ll

[AMDGPU] Pass the cast source to isKnownNonNull in lowerADDRSPACECAST

`lowerADDRSPACECAST` passes the cast node instead of its source to
`isKnownNonNull`. The cast node is never a frame index, a global address, or a
constant, so the check never succeeds, and SelectionDAG checks for null when it
casts an alloca or a global. At -O2 the `nonnull` flag that IR passes set on the
cast hides this, but at -O0 every such cast gets a compare and two selects. The
GlobalISel path already passes the source.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+0-14llvm/test/CodeGen/AMDGPU/addrspacecast-known-non-null-O0.ll
+3-11llvm/test/DebugInfo/AMDGPU/debug-loc-copy.ll
+2-2llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+5-273 files

LLVM/project 6b63fe0 — libc/src/__support/CPP CMakeLists.txt simd.h, libc/src/string/memory_utils/generic inline_strlen.h

[libc] Add UB-free cpp::to_bitmask helper

Bit-casting a simd<bool, N> mask directly to its integer simd_bitmask
type reads padding bits as poison whenever N is not a multiple of
CHAR_BIT (for example, the scalar fallback N == 1).

Add cpp::to_bitmask to convert simd<bool, N> masks without reading
padding bits, and use it in shift_mask in inline_strlen.h.

Assisted-By: LLM

Reviewers: jhuber6, michaelrj-google

Pull Request: https://github.com/llvm/llvm-project/pull/244696
DeltaFile
+21-0libc/test/src/__support/CPP/simd_test.cpp
+13-0libc/src/__support/CPP/simd.h
+1-1libc/src/string/memory_utils/generic/inline_strlen.h
+1-0libc/src/__support/CPP/CMakeLists.txt
+36-14 files

LLVM/project 1bf3c85 — libc/src/__support/CPP simd.h, libc/src/string/memory_utils/generic inline_strlen.h

fix

Created using spr 1.3.7
DeltaFile
+7-5libc/src/string/memory_utils/generic/inline_strlen.h
+0-2libc/src/__support/CPP/simd.h
+7-72 files

LLVM/project ed633a6 — libc/src/__support/CPP simd.h, libc/src/string/memory_utils/generic inline_strlen.h

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+7-5libc/src/string/memory_utils/generic/inline_strlen.h
+0-2libc/src/__support/CPP/simd.h
+7-72 files

LLVM/project 3a0a2e1 — llvm/lib/Transforms/Vectorize LoopVectorize.cpp VPlan.cpp

[VPlan] Use map_range with CastTo for cast-only range loops (NFC). (#244713)

Replace loops of the form

  for (VPRecipeBase &R : VPBB->phis()) {
    auto *PhiR = cast<VPPhi>(&R);

with

  for (VPPhi &PhiR : map_range(VPBB->phis(), CastTo<VPPhi>)) {

and similarly for loops over users, so the cast is part of the range.
Also use the existing VPBlockUtils::blocksAs where applicable, and
make_isa_range instead of hand-written filter + cast combinations.

This is slightly more explicit and more compact.
DeltaFile
+30-38llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+21-29llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+6-7llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
+5-5llvm/lib/Transforms/Vectorize/VPlan.cpp
+4-5llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+66-845 files

LLVM/project c786f38 — libc/src/__support/CPP simd.h, libc/src/string/memory_utils/generic inline_strlen.h

feedback

Created using spr 1.3.7
DeltaFile
+7-5libc/src/string/memory_utils/generic/inline_strlen.h
+0-2libc/src/__support/CPP/simd.h
+7-72 files

LLVM/project e6cc75b — libc/src/__support/CPP simd.h

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+0-2libc/src/__support/CPP/simd.h
+0-21 files

LLVM/project 3643703 — llvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp AMDGPULowerModuleLDSPass.cpp, llvm/test/CodeGen/AMDGPU lds-link-time-named-barrier.ll lower-module-lds-link-time-comdat.ll

[AMDGPU] Fix LDS externalization for object linking

With object linking, the backend converts LDS variables and named barriers to
external declarations, and the linker allocates them. There are two cases that
could potentially make invalid IR or cause a crash:

- LDS or a named barrier with vague linkage, for example a shared variable in an
inline function, is in a comdat. The external declaration kept the comdat, and
the verifier rejected the module: "Declaration may not be in a Comdat!".
- Alloca promotion to LDS runs after LDS lowering. The LDS variable that it
created stayed an internal definition, and the asm printer asserted: "LDS
definitions should have been externalized when object linking is enabled".

This PR fixes both of them.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+83-0llvm/test/CodeGen/AMDGPU/promote-alloca-object-linking.ll
+8-18llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
+26-0llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.h
+26-0llvm/test/CodeGen/AMDGPU/lower-module-lds-link-time-comdat.ll
+16-0llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+10-2llvm/test/CodeGen/AMDGPU/lds-link-time-named-barrier.ll
+169-201 files not shown
+170-227 files

LLVM/project bc52d78 — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls arm64ec.ll aarch64.ll

RuntimeLibcalls: Add attributes to __arm_sc_memcpy, memmove and memset

The streaming-compatible variants behave like memcpy, memmove and
memset. Omit captures(none) since these can be used to implement volatile
memory intrinsics.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+20-20llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+18-3llvm/include/llvm/IR/RuntimeLibcalls.td
+4-4llvm/test/Transforms/Util/DeclareRuntimeLibcalls/arm64ec.ll
+42-273 files

LLVM/project fe1422e — llvm/include/llvm/IR RuntimeLibcallsImpl.td RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls codegen-opt-flags.ll

RuntimeLibcalls: Add alignment to aligned memory helper arguments

Add the alignment annotations to target specific memcpy-like functions.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+27-17llvm/include/llvm/IR/RuntimeLibcalls.td
+12-5llvm/test/Transforms/Util/DeclareRuntimeLibcalls/codegen-opt-flags.ll
+4-0llvm/include/llvm/IR/RuntimeLibcallsImpl.td
+43-223 files

LLVM/project c7621ca — llvm/include/llvm/IR RuntimeLibcalls.td

RuntimeLibcalls: Add attributes to ObjC runtime calls

Mark the ObjC runtime functions nounwind, and mark the argument of
the functions whose intrinsics mark their argument returned.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+31-26llvm/include/llvm/IR/RuntimeLibcalls.td
+31-261 files

LLVM/project 3daa08b — llvm/include/llvm/IR RuntimeLibcalls.td

RuntimeLibcalls: Add attributes to operator new and delete

Annotate operator new and delete implementation variants. The nothrow
variants are nounwind. No library registers these yet so they don't
appear in the DeclareRuntimeLibcalls tests.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+100-64llvm/include/llvm/IR/RuntimeLibcalls.td
+100-641 files

LLVM/project 43a9b63 — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls xcore.ll emscripten.ll

RuntimeLibcalls: Add attributes to printf variants (#244649)

Give the integer-only and size-optimized printf variants the
attributes of the corresponding printf functions.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+6-6llvm/include/llvm/IR/RuntimeLibcalls.td
+5-3llvm/test/Transforms/Util/DeclareRuntimeLibcalls/xcore.ll
+5-3llvm/test/Transforms/Util/DeclareRuntimeLibcalls/emscripten.ll
+16-123 files

LLVM/project 0072c7f — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 gather-shuffle-single-entry-multi-part.ll

[SLP]Fix lost lanes in single-entry multi-register gather shuffle

When a single node matches the whole gather, isGatherShuffledEntry
returns one entry with a mask over all lanes, even if the vector spans
several registers. The build vector code still cut that mask per
register, so lanes past the first register became poison.

Fixes #244597

Pull-request: https://github.com/llvm/llvm-project/pull/244722
DeltaFile
+125-0llvm/test/Transforms/SLPVectorizer/X86/gather-shuffle-single-entry-multi-part.ll
+4-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+129-12 files

LLVM/project 46b1b1d — llvm/lib/Target/SystemZ/MCTargetDesc SystemZHLASMAsmStreamer.cpp, llvm/test/CodeGen/SystemZ zos-hlasm-dc-xl.ll

Add latest changes after rebase
DeltaFile
+7-5llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+2-2llvm/test/CodeGen/SystemZ/zos-hlasm-dc-xl.ll
+9-72 files

LLVM/project 72aac37 — llvm/lib/Target/SystemZ/MCTargetDesc SystemZHLASMAsmStreamer.cpp

Update formatting
DeltaFile
+1-1llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+1-11 files

LLVM/project e84441f — llvm/lib/Target/SystemZ/MCTargetDesc SystemZHLASMAsmStreamer.h SystemZHLASMAsmStreamer.cpp, llvm/test/CodeGen/SystemZ zos-hlasm-dc-xl.ll

[SystenZ][z/OS] Beautify HLASM output

Instructions are currently indented by 2 spaces, which makes the output
hard to read. This changes increases the indentation to 10, which improves
the readability. The indent is now controlled by a constant instead of
hard-coded spaces.
DeltaFile
+44-44llvm/test/CodeGen/SystemZ/zos-hlasm-dc-xl.ll
+11-8llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+6-1llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h
+61-533 files

LLVM/project a92f85d — llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU addrspacecast-known-non-null-O0.ll

[AMDGPU] Pass the cast source to isKnownNonNull in lowerADDRSPACECAST

`lowerADDRSPACECAST` passes the cast node instead of its source to
`isKnownNonNull`. The cast node is never a frame index, a global address, or a
constant, so the check never succeeds, and SelectionDAG checks for null when it
casts an alloca or a global. At -O2 the `nonnull` flag that IR passes set on the
cast hides this, but at -O0 every such cast gets a compare and two selects. The
GlobalISel path already passes the source.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+0-14llvm/test/CodeGen/AMDGPU/addrspacecast-known-non-null-O0.ll
+2-2llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+2-162 files

LLVM/project 114492e — llvm/test/CodeGen/AMDGPU addrspacecast-known-non-null-O0.ll

[NFC][AMDGPU] Add a test for casts of known non-null pointers at -O0 (#244286)

At -O0, SelectionDAG checks for null when it casts an alloca or an LDS
global to flat, but GlobalISel does not.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+101-0llvm/test/CodeGen/AMDGPU/addrspacecast-known-non-null-O0.ll
+101-01 files