LLVM/project d44bb80 — llvm/lib/Transforms/InstCombine InstCombineAddSub.cpp, llvm/test/Transforms/InstCombine add-sext-icmp.ll

[InstCombine] Allow multi-use icmp in (add (..) (sext (icmp ne A, 0))) fold. (#243186)

The fold to umax(A, 1) is profitable even if the icmp has other users:
it replaces the two adds and the sext with a single umax and the icmp
stays alive for its other users.

This shows up after LoopVectorize, where the trip count
(A + 1 - umin(A, 1)) shares umin(A, 1) with the runtime check bounds.

Triggers in ClamAV and also SPEC2017:
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/2051

PR: https://github.com/llvm/llvm-project/pull/243186
DeltaFile
+40-3llvm/test/Transforms/InstCombine/add-sext-icmp.ll
+2-2llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+42-52 files

LLVM/project 7993afa — compiler-rt/lib/sanitizer_common sanitizer_offload.cpp

fix pred
DeltaFile
+6-4compiler-rt/lib/sanitizer_common/sanitizer_offload.cpp
+6-41 files

LLVM/project f03f0a2 — llvm/lib/Transforms/Scalar ConstraintElimination.cpp, llvm/test/Transforms/ConstraintElimination 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
+369-2llvm/test/Transforms/ConstraintElimination/minmax.ll
+171-0llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+540-22 files

LLVM/project 556678f — libc/src/__support/FPUtil dyadic_float.h double_double.h, libc/test/src/__support/FPUtil CMakeLists.txt multiply_add_test.cpp

[libc][math] Add multiply_sub, add_multiply, and sub_multiply to multiply_add.h.

- Add fputil::multiply_sub (x * y - z), fputil::add_multiply (x + y * z), and
  fputil::sub_multiply (x - y * z) alongside fputil::multiply_add (x * y + z).
- Use template-based hardware FMA dispatch and size-aware inline overloads so
  explicit multiply_add<T> calls also use hardware FMA when available.
- Add NumberPair<T> add/sub overloads in double_double.h, and matching
  multiply_sub, add_multiply, and sub_multiply overloads for DoubleDouble and
  DyadicFloat.
- Add unit tests in libc/test/src/__support/FPUtil/multiply_add_test.cpp.
DeltaFile
+175-40libc/src/__support/FPUtil/multiply_add.h
+174-0libc/test/src/__support/FPUtil/multiply_add_test.cpp
+58-0libc/src/__support/FPUtil/double_double.h
+21-0libc/src/__support/FPUtil/dyadic_float.h
+13-0libc/test/src/__support/FPUtil/CMakeLists.txt
+12-0utils/bazel/llvm-project-overlay/libc/test/src/__support/FPUtil/BUILD.bazel
+453-402 files not shown
+459-408 files

LLVM/project 2fb7efa — llvm/lib/Target/AMDGPU GCNHazardRecognizer.cpp, llvm/test/CodeGen/AMDGPU fdiv.bf16.ll llvm.log2.bf16.ll

[AMDGPU] Mitigate TRANS f16 to partial VGPR write WAW hazard

Fixes: ROCM-33929
DeltaFile
+226-0llvm/test/CodeGen/AMDGPU/hazard-partial-trans-f16-write.mir
+170-0llvm/test/CodeGen/AMDGPU/hazard-partial-trans-f16-write-fake16.mir
+101-0llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
+29-16llvm/test/CodeGen/AMDGPU/llvm.exp2.bf16.ll
+24-13llvm/test/CodeGen/AMDGPU/llvm.log2.bf16.ll
+10-7llvm/test/CodeGen/AMDGPU/fdiv.bf16.ll
+560-365 files not shown
+577-4011 files

LLVM/project 33c3fb0 — clang/docs ReleaseNotes.md SanitizerSpecialCaseList.md, clang/test/Driver fsanitize-ignorelist.c

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+49-0llvm/unittests/Support/SpecialCaseListTest.cpp
+23-14clang/docs/SanitizerSpecialCaseList.md
+16-5llvm/lib/Support/SpecialCaseList.cpp
+3-2llvm/include/llvm/Support/SpecialCaseList.h
+5-0clang/test/Driver/fsanitize-ignorelist.c
+5-0clang/docs/ReleaseNotes.md
+101-216 files

LLVM/project 9381079 — llvm/lib/Target/NVPTX NVPTXReplaceImageHandles.cpp, llvm/test/CodeGen/NVPTX tex-handle-in-reg-sm20.ll tex-handle-in-reg-nvcl.ll

[NVPTX] Don't crash on image handles that are not params or globals (#238504)

NVPTXReplaceImageHandles hits llvm_unreachable when a texture, sampler
or surface handle is defined by anything other than a param load,
texsurf_handles or a copy, e.g. a handle returned by a call, merged by a
phi or computed with arithmetic. Release builds go on to crash in the
AsmPrinter.

Such handles have no symbol to replace them with, so leave them in a
register, as is already done for CUDA param loads. This needs bindless
textures and surfaces, and PTX only allows texture and sampler handles
in registers in unified texture mode, so report an error on sm_2x and
for texture and sampler handles in independent texture mode instead of
emitting invalid PTX.

---------

Co-authored-by: mmalavika <mmalavika at nvidia.com>
DeltaFile
+96-0llvm/test/CodeGen/NVPTX/tex-handle-in-reg.ll
+32-7llvm/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp
+33-0llvm/test/CodeGen/NVPTX/tex-handle-in-reg-nvcl.ll
+26-0llvm/test/CodeGen/NVPTX/tex-handle-in-reg-sm20.ll
+187-74 files

LLVM/project cecb42f — llvm/test/tools/llvm-diff compare-aliasing-metadata.ll, llvm/tools/llvm-diff/lib DiffConsumer.h DifferenceEngine.cpp

Revert "[llvm-diff] Compare TBAA and alias scope metadata" (#243239)

Reverts llvm/llvm-project#238976

Looks like the new test broke because of a mid-air collision with
080bb047270d99b468db8ca9603ff1b320124eff.
DeltaFile
+0-200llvm/test/tools/llvm-diff/compare-aliasing-metadata.ll
+1-120llvm/tools/llvm-diff/lib/DiffConsumer.cpp
+1-7llvm/tools/llvm-diff/lib/DifferenceEngine.cpp
+0-3llvm/tools/llvm-diff/lib/DiffConsumer.h
+2-3304 files

LLVM/project 1b877f0 — utils/bazel/llvm-project-overlay/libc libc_build_rules.bzl, utils/bazel/llvm-project-overlay/libc/include BUILD.bazel

[bazel][libc] Allow generated headers to be filtered by entrypoint (#243168)

For https://github.com/llvm/llvm-project/issues/242727. This PR splits
the `libc_generated_header` rule into two steps. Instead of directly
generating a header, we introduce two new rules: `libc_hdrgen_spec` and
`libc_generated_headers`. The former describes all the inputs to a
`hdrgen` invocation for a header without producing a file, and the
latter generates the header from the spec while letting you specify
`--entrypoints=`.

This is nice because it allows rules to share definitions for how
headers are produced while specifying their own sets of `entrypoints`.

---

**Note:** this is not exactly equivalent to how the CMake build works.
In this PR, LLVM-libc function objects are still compiled against
[unfiltered
headers](https://github.com/llvm/llvm-project/blob/cbfac21cd384f6c7c480c2d0026ecedfe2d619e7/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl#L46),

    [23 lines not shown]
DeltaFile
+140-28utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
+46-1utils/bazel/llvm-project-overlay/libc/test/BUILD.bazel
+23-7utils/bazel/llvm-project-overlay/libc/include/BUILD.bazel
+209-363 files

FreeBSD/ports a74d9a0 — science/apbs Makefile pkg-plist

science/apbs: fix plist
DeltaFile
+7-0science/apbs/pkg-plist
+1-0science/apbs/Makefile
+8-02 files

FreeBSD/ports f2de5ea — science/amrex Makefile pkg-plist

science/amrex: fix plist
DeltaFile
+20-3science/amrex/pkg-plist
+1-0science/amrex/Makefile
+21-32 files

FreeBSD/ports 7148d5c — math/universal Makefile distinfo

math/universal: update 5.10.0 → 5.17.0
DeltaFile
+44-8math/universal/pkg-plist
+3-3math/universal/distinfo
+2-2math/universal/Makefile
+49-133 files

FreeBSD/ports de80df8 — math/clad Makefile pkg-plist

math/clad: fix plist
DeltaFile
+5-0math/clad/pkg-plist
+1-0math/clad/Makefile
+6-02 files

LLVM/project a027f40 — lld/MachO Driver.cpp, lld/test/MachO objc-category-merging-minimal.s objc-category-merging-erase-objc-name-test.s

[lld][MachO] Remove -no_objc_relative_method_lists from tests
DeltaFile
+32-32lld/test/MachO/objc-category-merging-complete-test.s
+8-8lld/test/MachO/objc-category-conflicts.s
+5-5lld/test/MachO/objc-category-merging-swift.s
+3-6lld/MachO/Driver.cpp
+4-4lld/test/MachO/objc-category-merging-minimal.s
+4-4lld/test/MachO/objc-category-merging-erase-objc-name-test.s
+56-596 files

GhostBSD/ports 2784726 — sysutils Makefile

sysutils/Makefile: fix u-boot-cm3588-nas SUBDIR entry

The entry pointed to u-boot-cm3588, which does not exist, so poudriere
warned about a nonexistent origin and skipped it.
DeltaFile
+1-1sysutils/Makefile
+1-11 files

GhostBSD/ports a1b18d8 — Mk/Scripts create-manifest.sh

Mk/Scripts/create-manifest.sh: drop unused dp_ABISTRING check

Nothing sets dp_ABISTRING since the merge, so every package build
aborted in create-manifest. The script never uses it, and upstream
does not require it.
DeltaFile
+1-1Mk/Scripts/create-manifest.sh
+1-11 files

LLVM/project 73885e8 — compiler-rt/lib/sanitizer_common sanitizer_offload_hsa.h sanitizer_offload.h

Fix XCCs and packets
DeltaFile
+42-36compiler-rt/lib/sanitizer_common/sanitizer_offload.cpp
+1-0compiler-rt/lib/sanitizer_common/sanitizer_offload_hsa.h
+1-0compiler-rt/lib/sanitizer_common/sanitizer_offload.h
+44-363 files

LLVM/project 9bd8318 — llvm/test/tools/llvm-objdump/MachO/AArch64 macho-relative-method-lists-high-address.test, llvm/tools/llvm-objdump MachODump.cpp

[objdump] Fix relative method pointer size
DeltaFile
+495-0llvm/test/tools/llvm-objdump/MachO/AArch64/macho-relative-method-lists-high-address.test
+5-5llvm/tools/llvm-objdump/MachODump.cpp
+500-52 files

LLVM/project aa4d5c2 — clang/lib/CodeGen CGExprCXX.cpp, clang/test/CodeGenCXX new_hot_cold.cpp

CGExprCXX: emit family and allockind attributes

This allows us to remove the special knowledge about C++ allocation from
LLVM's MemoryBuiltins.cpp, instead trusting attributes to communicate
the important properties.

Annoyingly, clang has to grow a little bit of hard-coded knowledge about
mangled symbol names in order to actually get the most-basic-matching
::operator::new when working out the alloc-family attribute. I spent
some time trying to do this "right" by looking up the available
operators new and finding the best one, but that's super tricky and this
has the virtue of working and being pretty obviously correct when
compared to the old code.

Happily, clang now emits allocator family attributes for custom
allocators like the `__hot_cold_t` overloads in `new_hot_cold.cpp`
(which `isReplaceableGlobalAllocationFunction` in clang recognizes),
allowing us to remove that special knowledge from LLVM.


    [7 lines not shown]
DeltaFile
+2-120llvm/lib/Analysis/MemoryBuiltins.cpp
+51-51llvm/test/Transforms/InstCombine/new-delete-itanium.ll
+51-3clang/lib/CodeGen/CGExprCXX.cpp
+10-22clang/test/Headers/openmp_new_nothrow.cpp
+14-14llvm/test/Transforms/InstCombine/new-delete-itanium-32.ll
+16-10clang/test/CodeGenCXX/new_hot_cold.cpp
+144-22017 files not shown
+177-25023 files

LLVM/project a323641 — llvm/lib/Transforms/Utils SimplifyLibCalls.cpp, llvm/test/Transforms/InstCombine simplify-libcalls-new.ll

SimplifyLibCalls: preserve allocation attributes in optimizeNew

When `LibCallSimplifier::optimizeNew` rewrites an `operator new` call into a
`__hot_cold_t` allocation call, forward the allocation attributes
(`allockind`, `allocsize`, `"alloc-family"`, and parameter `allocalign`) from
the original call onto the synthesized call instruction alongside its metadata.

This is a new patch since 2023 (unlike most of the rest of the stack)
and allows the next patch to remove more specialized C++ knowledge
from the LLVM layer, instead leaving it in clang where it seems more
sensible.

This patch was authored with the assistance of an LLM and was reviewed
by me before posting.
DeltaFile
+10-1llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+1-1llvm/test/Transforms/InstCombine/simplify-libcalls-new.ll
+11-22 files

LLVM/project a7d9f3c — clang/lib/CodeGen CGCall.cpp, clang/test/CodeGen alloc-align-attr.c catch-alignment-assumption-attribute-alloc_align-on-function.cpp

clang: emit allocalign to LLVM for alloc_align attributes

LLVM is growing knowledge of this, so we should inform it when we have
the information available. As a bonus, since we now check return
alignments in the callee as of an earlier patch of mine, we can now drop
the redundant llvm.assume() that this previously emitted.

This patch is originally from 2023 and was rebased and revised with
assistance from an LLM. I have manually reviewed the diffs to the
limit of my abilities (I don't do much in LLVM, and this is my first
time touching clang in a meaningful way) and they appear sensible. The
commit messages are entirely written by me.

Differential Revision: https://reviews.llvm.org/D119271
DeltaFile
+14-85clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp
+7-36clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function.cpp
+24-2clang/lib/CodeGen/CGCall.cpp
+6-16clang/test/CodeGen/alloc-align-attr.c
+8-8clang/test/CodeGenCXX/new_hot_cold.cpp
+6-6clang/test/CodeGenCXX/cxx1z-aligned-allocation.cpp
+65-1539 files not shown
+80-18115 files

LLVM/project 0c09a06 — clang/lib/CodeGen CodeGenFunction.cpp, clang/test/CodeGen catch-alignment-assumption-attribute-assume_aligned-on-function.cpp catch-alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp

clang: also check alloc_align and assume_aligned claims in return

Prior to this patch, we only check alloc_align and assume_aligned claims
in the caller. We are about to thread alloc_align information down into
LLVM, which would then have a chance to defeat the sanitizer checks by
performing optimizations. To avoid that, we also check alignment claims
in the called function prior to return.

Per review feedback on D121629:
- Also verify the alignment required by `AssumeAlignedAttr` in
  `EmitReturnValueCheck`.
- Add a new `ReturnAlignmentAssumption` (`return_alignment_assumption`)
  sanitizer handler in clang and compiler-rt that accepts the dynamic
  return statement `SourceLocation` pointer loaded from `ReturnLocation`.
- Only emit the sanitizer check (and not a redundant `llvm.assume`) in
  `EmitReturnValueCheck`.

This patch is originally from 2023 and was rebased and revised with
assistance from an LLM. I have manually reviewed the diffs to the

    [5 lines not shown]
DeltaFile
+90-15clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function.cpp
+90-15clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp
+82-13clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp
+79-13clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function.cpp
+51-18clang/lib/CodeGen/CodeGenFunction.cpp
+46-10compiler-rt/lib/ubsan/ubsan_handlers.cpp
+438-8411 files not shown
+504-8817 files

LLVM/project b225dc1 — clang/lib/CodeGen CodeGenFunction.h CodeGenFunction.cpp

[NFC] clang: simplify emitAlignmentAssumptionCheck (#239728)

Move the alignment check condition (`ptrtoint`, optional offset
subtraction, mask, and `icmp eq 0`) into
`CodeGenFunction::emitAlignmentAssumptionCheck` and emit the sanitizer
check before `Builder.CreateAlignmentAssumption`.

This removes the need to pass `TheCheck` and `Assumption` into
`emitAlignmentAssumptionCheck` (or temporarily unlink and re-insert
`Assumption`) and prepares `emitAlignmentAssumptionCheck` to be called
directly without an accompanying `@llvm.assume`.

This patch is new since this line of work was originally authored in
2023. It was largely written by an LLM in response to review feedback
for the next patch, but I hand-reviewed the content and it looks
reasonable enough (with the same disclaimer as other patches that I know
nothing about clang.)
DeltaFile
+47-64clang/lib/CodeGen/CodeGenFunction.cpp
+1-3clang/lib/CodeGen/CodeGenFunction.h
+48-672 files

LLVM/project 67ab653 — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 splat-gather-subtree-reuse.ll

[SLP]Fix copyable FP lanes changing NaN and subnormal bits

FP identity ops on copyable lanes may quiet NaNs and flush
subnormals. Keep such lanes only for FP math users, otherwise
blend the original values back.

Fixes #243130
Fixes #243217

Pull-request: https://github.com/llvm/llvm-project/pull/243243
DeltaFile
+140-10llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+36-19llvm/test/Transforms/SLPVectorizer/AArch64/splat-gather-subtree-reuse.ll
+23-28llvm/test/Transforms/SLPVectorizer/X86/reassoc-flattened-copyable-operand.ll
+26-23llvm/test/Transforms/SLPVectorizer/X86/gathered-loads-non-full-reg.ll
+12-19llvm/test/Transforms/SLPVectorizer/X86/deleted-inst-reduction-attempt.ll
+17-8llvm/test/Transforms/SLPVectorizer/X86/ordered-reduction-root-deleted.ll
+254-10717 files not shown
+362-15223 files

LLVM/project 20b316d — clang/lib/Driver Driver.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+1-3clang/lib/Driver/Driver.cpp
+1-31 files

LLVM/project e692a3d — llvm/lib/Target/AMDGPU GCNHazardRecognizer.cpp, llvm/test/CodeGen/AMDGPU fdiv.bf16.ll llvm.log2.bf16.ll

[AMDGPU] Mitigate TRANS f16 to partial VGPR write WAW hazard

Fixes: ROCM-33929
DeltaFile
+226-0llvm/test/CodeGen/AMDGPU/hazard-partial-trans-f16-write.mir
+170-0llvm/test/CodeGen/AMDGPU/hazard-partial-trans-f16-write-fake16.mir
+101-0llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
+29-16llvm/test/CodeGen/AMDGPU/llvm.exp2.bf16.ll
+24-13llvm/test/CodeGen/AMDGPU/llvm.log2.bf16.ll
+10-7llvm/test/CodeGen/AMDGPU/fdiv.bf16.ll
+560-365 files not shown
+577-4011 files

GhostBSD/ports 2123cc6 — devel/llvm18-libs Makefile, devel/llvm19-libs Makefile

devel/llvm1[89]-libs, llvm2[0-2]-libs: bump PORTREVISION

The GOLD option was removed to follow upstream, so these ports no
longer install LLVMgold.so. Bump PORTREVISION so the package change
is picked up.
DeltaFile
+1-1devel/llvm22-libs/Makefile
+1-1devel/llvm21-libs/Makefile
+1-1devel/llvm20-libs/Makefile
+1-1devel/llvm19-libs/Makefile
+1-1devel/llvm18-libs/Makefile
+5-55 files

LLVM/project a7ebabb — llvm/test/Transforms/Attributor memory-location-writable.ll

Attributor: Use one check prefix in memory-location-writable.ll

Replace the tests with one function whose stored pointer is read back
at an unknown offset. It hits the conflict in attributor,
attributor-cgscc and attributor-light and gives the same output in all
three, so all RUN lines share one check prefix.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+13-46llvm/test/Transforms/Attributor/memory-location-writable.ll
+13-461 files

FreeBSD/ports d07ba10 — devel/got distinfo Makefile

devel/got: update to 0.131

User-visible changes:
- remove support for .cvsignore files
- always print a tab after the file name in unidiff headers, for Larry patch(1)
DeltaFile
+5-6devel/got/Makefile
+3-7devel/got/distinfo
+8-132 files

LLVM/project 51f2919 — flang-rt/lib/runtime edit-input.cpp, flang-rt/test/Driver boz-input-field.f90

[flang-rt] Consume the whole field in B/O/Z input (#238057)

EditBOZInput reads a fixed-width field twice: the first pass counts the
significant digits, then it rewinds to the first significant digit and
the second pass decodes exactly that many digits. Nothing moved the
position back to the end of the field afterwards, so the next edit
descriptor started reading right after the last significant digit:
    
      s = '1F    XY'; read (s, '(z6,a2)') i, c   ! c was '  ', not 'XY'
      s = '1f,2';     read (s, '(z4,i2)') i, j   ! j was 0, not 2
    
The second pass also called GotChar() again for each character it
re-read, so READ(SIZE=) counted the significant digits twice (8 instead
of 6 for '(z6)' on '  1F  ').
    
Record the position reached at the end of the first pass, which is past
any trailing blanks and any separator that ended the field early, and
return to it after decoding. Undo the SIZE= count of the re-read
characters.

    [8 lines not shown]
DeltaFile
+94-0flang-rt/test/Driver/boz-input-field.f90
+29-0flang-rt/unittests/Runtime/InputExtensions.cpp
+12-0flang-rt/lib/runtime/edit-input.cpp
+6-0flang/docs/Extensions.md
+141-04 files