LLVM/project 8e196cd — libcxx/include string, libcxx/test/std/strings/basic.string/string.modifiers/string_append size_char.pass.cpp

Reapply "[libc++] Fix incorrect size check when growing std::string" (#234545) (#234551)

There was a race condition with another commit adding another call of
`__get_amortized_growth_capacity`. This is fixed in this version.

Original commit message:

When trying to grow very large amounts the `max_size()` check could fail
due to
the result of adding the current capacity and the additional capacity
could wrap.

This reverts commit 64b40b84eb293e259cfe36add2ac34ab3dafc05c.
DeltaFile
+9-9libcxx/include/string
+11-0libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp
+11-0libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp
+11-0libcxx/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp
+42-94 files

LLVM/project 3e6b320 — llvm/docs AMDGPUDwarfExtensionsForHeterogeneousDebugging.md AMDGPUUsage.md, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.512bit.ll amdgcn.bitcast.1024bit.ll

Merge branch 'fix-sp-before-chain-call' into stack-size-no-chain-callees
DeltaFile
+14,649-17,027llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+0-22,228llvm/docs/AMDGPUUsage.rst
+18,097-0llvm/docs/AMDGPUUsage.md
+4,663-5,725llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+9,687-0llvm/test/TableGen/x86-fold-tables.inc
+5,324-0llvm/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.md
+52,420-44,9804,491 files not shown
+268,585-151,2114,497 files

LLVM/project 9837af1 — llvm/lib/Target/AVR AVRTargetMachine.cpp AVRISelDAGToDAG.cpp

[AVR] Port SelectionDAGISel to NewPM

Standard NewPM pass porting.

Reviewers: arsenm, benshi001

Pull Request: https://github.com/llvm/llvm-project/pull/236243
DeltaFile
+10-1llvm/lib/Target/AVR/AVR.h
+7-2llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
+1-1llvm/lib/Target/AVR/AVRTargetMachine.cpp
+18-43 files

LLVM/project b132882 — llvm/lib/Target/AVR AVRCodeGenPassBuilder.cpp

formatting

Created using spr 1.3.7
DeltaFile
+6-3llvm/lib/Target/AVR/AVRCodeGenPassBuilder.cpp
+6-31 files

LLVM/project 907067c — llvm/lib/Target/AVR AVRCodeGenPassBuilder.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+6-3llvm/lib/Target/AVR/AVRCodeGenPassBuilder.cpp
+6-31 files

LLVM/project 34b8553 — llvm/lib/Target/AVR AVRCodeGenPassBuilder.cpp

formatting

Created using spr 1.3.7
DeltaFile
+6-3llvm/lib/Target/AVR/AVRCodeGenPassBuilder.cpp
+6-31 files

LLVM/project 9617bdb — llvm/docs AMDGPUUsage.md

Document that we can't reference caller's stack
DeltaFile
+2-1llvm/docs/AMDGPUUsage.md
+2-11 files

LLVM/project 0857266 — offload/liboffload/src OffloadImpl.cpp, offload/libompaccsupport device.cpp

[Offload][Omp] Remove usages of GenericDeviceTy (#236340)

Remove all simple direct usages of GenericDeviceTy. In most cases
replace with equivalents from liboffload itself.

For RecordReplay, access it through a helper in liboffload. This will
allow to eventually remove completely GenericDeviceTy from the
libomptarget structures.

Assisted by Claude.
DeltaFile
+12-12offload/libompaccsupport/device.cpp
+5-0offload/liboffload/src/OffloadImpl.cpp
+0-1offload/libomptarget/OpenMP/API.cpp
+17-133 files

LLVM/project ef6e749 — llvm/docs AMDGPUDwarfExtensionsForHeterogeneousDebugging.md AMDGPUUsage.md, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.512bit.ll amdgcn.bitcast.1024bit.ll

Merge remote-tracking branch 'remotes/origin/main' into fix-sp-before-chain-call-plus-main
DeltaFile
+14,649-17,027llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+0-22,228llvm/docs/AMDGPUUsage.rst
+18,096-0llvm/docs/AMDGPUUsage.md
+4,663-5,725llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+9,687-0llvm/test/TableGen/x86-fold-tables.inc
+5,324-0llvm/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.md
+52,419-44,9804,489 files not shown
+268,231-151,2024,495 files

LLVM/project 84d9318 — mlir/docs SPIRVToLLVMDialectConversion.md, mlir/lib/Conversion/SPIRVToLLVM SPIRVToLLVM.cpp

[mlir][spirv-to-llvm] Add conversion for spirv.CopyMemory (#232944)

Convert `spirv.CopyMemory` to `llvm.intr.memcpy`. The byte size copied
is computed from the converted pointee type using the module's data
layout (`DataLayout::closest(op).getTypeSize(...)`) and passed as an
`i64` constant. Runtime arrays (converted to 0-element LLVM arrays) and
scalable types have no fixed static size and fail to match.

Memory-access operands follow the SPIR-V 1.4 specification: when only a
single mask is present it applies to both Target and Source, and when a
second mask is present it applies to Source while the first applies to
Target.
DeltaFile
+92-2mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
+53-0mlir/test/Conversion/SPIRVToLLVM/memory-ops-to-llvm.mlir
+39-0mlir/test/Conversion/SPIRVToLLVM/memory-ops-to-llvm-invalid.mlir
+21-1mlir/docs/SPIRVToLLVMDialectConversion.md
+205-34 files

LLVM/project 14a8bae — llvm/lib/Target/SPIRV SPIRVEmitIntrinsics.cpp, llvm/test/CodeGen/SPIRV alloca-constant-count-address-space.ll legalize-zero-size-arrays-alloca-count.ll

[SPIRV] Lower constant-count entry-block allocas without VLA (#232579)

`alloca T, N` with a constant N in the entry block is a fixed-size
allocation, but it was lowered through the variable-length array path
and required SPV_INTEL_variable_length_array. Rewrite it to `alloca [N x
T]` before pointer type inference so it becomes a plain OpVariable, as
InstCombine already does at -O1+.
DeltaFile
+75-0llvm/test/CodeGen/SPIRV/alloca-constant-count.ll
+30-1llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
+19-0llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_variable_length_array/large-constant-count.ll
+17-1llvm/test/CodeGen/SPIRV/legalize-zero-size-arrays-alloca-count.ll
+18-0llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_variable_length_array/vararr.ll
+12-0llvm/test/CodeGen/SPIRV/alloca-constant-count-address-space.ll
+171-26 files

LLVM/project 0e9beb0 — llvm/test/Transforms/JumpTableToSwitch skip.ll max_function_size.ll

[JumpTableToSwitch][test] Auto-generate test expectations (NFC) (#236069)
DeltaFile
+6-6llvm/test/Transforms/JumpTableToSwitch/profile-no-guid-metadata.ll
+10-1llvm/test/Transforms/JumpTableToSwitch/struct.ll
+10-1llvm/test/Transforms/JumpTableToSwitch/stride.ll
+7-0llvm/test/Transforms/JumpTableToSwitch/skip.ll
+7-0llvm/test/Transforms/JumpTableToSwitch/max_function_size.ll
+40-85 files

LLVM/project 97e2e66 — clang/unittests/CodeGen IRMatchers.h

[clang] Replace PointerUnion::dyn_cast with llvm::dyn_cast (NFC) (#236317)

PointerUnion::dyn_cast has been soft-deprecated in favor of
llvm::dyn_cast and llvm::dyn_cast_if_present.  This patch replaces
PointerUnion::dyn_cast with llvm::dyn_cast in
MatcherContext::Query::get.

Note that IRMatchers.h is only used by TBAAMetadataTest.cpp, where
MatcherContext::Query::Entity is always initialized with nonnull
pointers and never modified afterward.

Assisted-by: Antigravity
DeltaFile
+1-1clang/unittests/CodeGen/IRMatchers.h
+1-11 files

LLVM/project b5ad2c2 — offload/libompaccsupport device.cpp, offload/test/offloading kernel_launch_environment.c

[offload] Copy the kernel launch environment with a direct-write memcpy

Claude assisted with this patch.
DeltaFile
+76-0offload/test/offloading/kernel_launch_environment.c
+15-5offload/libompaccsupport/device.cpp
+91-52 files

LLVM/project 5ba0fc3 — offload/liboffload/API Memory.td

restore olMemcpy doc
DeltaFile
+1-2offload/liboffload/API/Memory.td
+1-21 files

LLVM/project f06c97e — llvm/lib/CodeGen RegAllocEvictionAdvisor.cpp

Set default cache min order to 32
DeltaFile
+1-1llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
+1-11 files

LLVM/project a36723f — llvm/lib/CodeGen CodeGenPrepare.cpp, llvm/lib/CodeGen/GlobalISel IRTranslator.cpp

[llvm] Remove unused type aliases in .cpp files (NFC) (#236318)

This patch removes unused using and typedef type aliases across .cpp
files under llvm/.

Note that none of the aliased types are spelled out in their
respective .cpp files, so these aliases have no potential use sites in
those files.

Assisted-by: Antigravity
DeltaFile
+0-8llvm/utils/FileCheck/FileCheck.cpp
+0-5llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
+0-5llvm/lib/CodeGen/CodeGenPrepare.cpp
+0-2llvm/utils/TableGen/SearchableTableEmitter.cpp
+0-2llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp
+0-2llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+0-248 files not shown
+0-3214 files

LLVM/project 26ec18f — llvm/docs LangRef.md

Adjust wording according to reviewer feedback
DeltaFile
+3-2llvm/docs/LangRef.md
+3-21 files

LLVM/project 9f0c2f9 — clang/lib/CodeGen/Targets X86.cpp, clang/test/CIR/Transforms/abi-lowering x86_64-bitint.cir

[Clang][ABI][X86] Don't return _BitInt as {i64, i64} (#236112)

`_BitInt(N)` for N <= 64 gets returned as `iN`, while for 64 < N < 128
it's returned as `{i64, i64}`, before it becomes `i128` again for N=128.

This changes the ABI code to always use `iN` for N <= 128 (larger types
get passed in memory, not directly).

This doesn't change the actual ABI (returned as two registers, high bits
unspecified), just simplifies how it is represented in IR.

Worth noting that the case of `_BitInt` inside a struct currently
produces different results between Clang and the ABI library. I will
address this in a followup. The argument case will also be handled
separately.

This is a followup to https://github.com/llvm/llvm-project/pull/234872,
which handled the N < 64 case.
DeltaFile
+18-76clang/test/CIR/Transforms/abi-lowering/x86_64-bitint.cir
+24-1llvm/unittests/ABI/X86TargetInfoTest.cpp
+9-11clang/lib/CodeGen/Targets/X86.cpp
+8-7llvm/lib/ABI/Targets/X86.cpp
+1-1clang/test/CodeGen/ext-int-cc.c
+1-1clang/test/CodeGen/X86/x86_64-abi-size.c
+61-971 files not shown
+62-987 files

LLVM/project 88c2cc8 — llvm/include/llvm/CodeGen ValueTypes.h, llvm/lib/CodeGen ValueTypes.cpp

[ValueTypes] Implement `getEVTString` in terms of `print` (#236276)

Many calls need to allocate, so add a version that doesn't require this
and use it in places where streams are already used.
DeltaFile
+71-31llvm/lib/CodeGen/ValueTypes.cpp
+9-5llvm/include/llvm/CodeGen/ValueTypes.h
+1-1llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+1-1llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
+82-384 files

LLVM/project f766ba2 — llvm/lib/Target/LoongArch LoongArchTargetTransformInfo.cpp

Address tangyan's comments
DeltaFile
+4-5llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.cpp
+4-51 files

LLVM/project fb5c64f — clang/docs ReleaseNotes.md, clang/lib/Sema SemaExprCXX.cpp

[Clang] use `SubstConstraintExpr` instead of `SubstExpr` in `Sema::BuildExprRequirement` (#236286)

This fixed a regression introduced since the last rewrite of concepts, mirroring 24df1d13d9090e075b162bf81d1a34a408e54924.
DeltaFile
+15-0clang/test/SemaTemplate/concepts-lambda.cpp
+3-0clang/docs/ReleaseNotes.md
+1-1clang/lib/Sema/SemaExprCXX.cpp
+19-13 files

LLVM/project 6d1bfd4 — clang/test/CodeGen/X86 f16c-builtins.c avx10_2_512convert-builtins.c

[X86] Add _MM_FROUND_TO_NEAREST_TIES_EVEN clang codegen test coverage (#202063)

The static rounding mode for X86 intrinsics that produce floating-point
results should use the macro `_MM_FROUND_TO_NEAREST_TIES_EVEN` rather
than `MM_FROUND_TO_NEAREST_INT`.

See also:
https://github.com/llvm/llvm-project/pull/99691#issuecomment-2245842818
DeltaFile
+12-12clang/test/CodeGen/X86/avx512dq-builtins.c
+12-12clang/test/CodeGen/X86/avx512dq-builtins-constrained.c
+2-2clang/test/CodeGen/X86/f16c-builtins.c
+2-2clang/test/CodeGen/X86/avx10_2_512convert-builtins.c
+28-284 files

LLVM/project 89d12a4 — clang/lib/AST ExprConstant.cpp, clang/lib/AST/ByteCode Compiler.cpp

[clang] support constexpr bitcasts to integer types (#231331)

Fixes [`159905`](https://github.com/llvm/llvm-project/issues/159905) by
extending both evaluators.

(code generation assisted by claude)
DeltaFile
+13-0clang/test/SemaCXX/constexpr-vectors.cpp
+10-1clang/lib/AST/ExprConstant.cpp
+2-2clang/lib/AST/ByteCode/Compiler.cpp
+25-33 files

LLVM/project 075a6cb — libc/src/__support/math CMakeLists.txt cosh.h, libc/test/src/math cosh_test.cpp

[libc][math] Implement double precision cosh correctly rounded to all rounding modes. (#235181)

Use shared `exp(x) +- exp(-x)` evaluations with `sinh` from
https://github.com/llvm/llvm-project/pull/235097.

Assisted-by: Gemini for analysis and refactoring.
DeltaFile
+187-0libc/test/src/math/cosh_test.cpp
+125-0libc/test/src/math/smoke/cosh_test.cpp
+95-0libc/src/__support/math/cosh_double_eval.h
+34-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+34-0libc/src/__support/math/cosh.h
+29-0libc/src/__support/math/CMakeLists.txt
+504-025 files not shown
+633-131 files

LLVM/project 1866d4c — libc/src/__support/math sinh_double_eval.h sinhcosh_accurate_128.h, libc/test/src/math sinh_test.cpp

[libc][math] Implement double precision sinh correctly rounded for all rounding modes. (#235097)

- Extend even/odd polynomial evalutions of exp(x) +- exp(-x) from single
precision to double-double and 128-bit fixed point.
- Optimize range reduction using the trick from previous exp
implementation, combining with the new fp-bitwise operations, and
reapply it to exp and exp2.

Assisted-by: Gemini for analysis and refactoring.
DeltaFile
+470-0libc/src/__support/math/sinhcosh_utils.h
+309-0libc/src/__support/math/sinhcosh_accurate_128.h
+237-0libc/src/__support/math/sinh_double_eval.h
+187-0libc/test/src/math/sinh_test.cpp
+123-0libc/test/src/math/smoke/sinh_test.cpp
+77-2utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+1,403-231 files not shown
+1,757-2537 files

LLVM/project f985e17 — llvm/include/llvm/Analysis ScalarEvolution.h, llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

[LV] Don't introduce UB when rewriting SCEVs with versioned strides. (#236313)

replaceSymbolicStrides rewrites the SCEVs of VPExpandSCEVRecipes in the
entry block using the versioned strides (e.g. Stride == 1). Those
expressions are expanded before the SCEV checks that guarantee the
predicates, so the rewritten expressions must not introduce UB when the
predicates do not hold. For example, the trip count n /u (stride + y)
was rewritten to n /u (y + 1), which divides by zero for y == -1 and
stride != 1, while the original loop is well defined.
DeltaFile
+11-13llvm/test/Transforms/LoopVectorize/version-stride-trip-count-expansion.ll
+9-8llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+3-3llvm/include/llvm/Analysis/ScalarEvolution.h
+23-243 files

LLVM/project 231ecc9 — libc/config/baremetal/hexagon entrypoints.txt

Add tanh to baremetal hexagon entrypoints.
DeltaFile
+1-0libc/config/baremetal/hexagon/entrypoints.txt
+1-01 files

LLVM/project ffcd39c — utils/bazel/llvm-project-overlay/libc/test/src/math/smoke BUILD.bazel

Fix bazel.
DeltaFile
+0-1utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+0-11 files

LLVM/project ef79e52 — libc/src/__support/math tanh_double_eval.h

Small simplification using exact_add.
DeltaFile
+10-10libc/src/__support/math/tanh_double_eval.h
+10-101 files