LLVM/project 641598f — llvm/test/CodeGen/AMDGPU mad-mix-fptrunc-rounding.ll fmed3.ll, llvm/test/CodeGen/AMDGPU/GlobalISel fmed3-min-max-const-combine.ll clamp-minmax-const-combine.ll

[KnownFPClass] Fix minnum/maxnum sNaN propagation (#233986)

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

Per the LangRef, `minnum`/`maxnum` may return NaN if either input is
sNaN.

`simplifyFCmpInst` also needs to handle `ord`/`uno` for `fcmp
(minnum/maxnum X, C2), C1`, since these would otherwise hit
`llvm_unreachable`. They no longer fold if `X` may be an sNaN. The
existing folds for the other predicates in that switch are unchanged.

A lot of AMDGPU tests involving `minnum`/`maxnum` were changed. So I
"duplicated" the tests to have a no-sNaN version. sNaN was ruled out via
`llvm.canonicalize` if I couldn't write `nofpclass(snan)` directly. I
attempted to make the "duplicated" tests as close to the original as
possible.

AI Disclosure:
I used Claude Opus 5 and Claude Opus 5.5 to help implement the changes,
along with writing and "duplicating" the tests.
DeltaFile
+1,122-79llvm/test/CodeGen/AMDGPU/mad-mix-lo.ll
+714-19llvm/test/CodeGen/AMDGPU/fmed3.ll
+293-9llvm/test/CodeGen/AMDGPU/GlobalISel/clamp-minmax-const-combine.ll
+240-15llvm/test/CodeGen/AMDGPU/mad-mix-fptrunc-rounding.ll
+144-24llvm/test/Transforms/Attributor/nofpclass-minnum-maxnum.ll
+136-6llvm/test/CodeGen/AMDGPU/GlobalISel/fmed3-min-max-const-combine.ll
+2,649-1527 files not shown
+3,000-16413 files

LLVM/project d0a7430 — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp

[NFC][SLP] Directly call Candidate.getRootNode() from BoUpSLP funcitons (#246934)

Eventually will pass in Candidate as a function parameter to these
functions rather than store Candidate in BoUpSLP.

AI Usage: Codex assisted
DeltaFile
+77-71llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+77-711 files

LLVM/project ec8cb54 — llvm/include/llvm/BinaryFormat/ELFRelocs Sparc.def, llvm/test/tools/llvm-readobj/ELF reloc-types-sparcv9.test

[SPARC] Add R_SPARC_JMP_IREL to the relocation list (#246966)

R_SPARC_JMP_IREL (248) is the PLT relocation for an ifunc, which glibc's
sparc64 ld.so handles. It was missing from Sparc.def, so llvm-readelf
and llvm-objdump could not name it.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+2-0llvm/test/tools/llvm-readobj/ELF/reloc-types-sparcv9.test
+1-0llvm/include/llvm/BinaryFormat/ELFRelocs/Sparc.def
+3-02 files

LLVM/project decf42b — llvm/include/llvm/Support SourceMgrDiagnosticVerifier.h, llvm/test/MC/RISCV rv64zalasr-invalid.s rv64c-invalid.s

[Support][llvm-mc] Match the full diagnostic message in llvm-mc --verify (#242553)

Like Clang's -verify, `llvm-mc --verify` directives currently match a
substring of the diagnostic message, so tests that want to check the
complete message cannot use --verify (see #242096).

Since --verify is new in llvm-mc, make it match the full message by
default: plain directives must equal the message and `-re` directives
must match all of it. `--verify-allow-partial-match` restores substring
matching. MLIR's verifier keeps substring matching.

Update the RISC-V tests that relied on substring matches.

Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/242553
DeltaFile
+16-3llvm/test/tools/llvm-mc/verify/basic.s
+12-4llvm/include/llvm/Support/SourceMgrDiagnosticVerifier.h
+6-6llvm/test/MC/RISCV/rv64zalasr-invalid.s
+6-6llvm/test/MC/RISCV/rv64c-invalid.s
+6-6llvm/test/MC/RISCV/rv32zalasr-invalid.s
+6-6llvm/test/MC/RISCV/rv32i-invalid.s
+52-3112 files not shown
+89-5718 files

LLVM/project 49387f1 — lld/MachO InputSection.cpp Writer.cpp, lld/test/MachO function-starts.s

[lld][MachO] Stream FunctionStartsSection from laid-out code sections

Currently, `FunctionStartsSection::finalizeContents()` scans every
`ObjFile`'s full symbol table, resolves `defined->getVA()` for each live
code symbol, sorts all addresses with `llvm::sort`, and encodes ULEB128
deltas through `raw_svector_ostream`.

By the time `FunctionStartsSection::finalizeContents()` runs, output
segments, their sections, and each `ConcatOutputSection`'s inputs are
already laid out in ascending virtual address order, and each input
section's `symbols` list is kept sorted by offset. This PR walks those
laid-out code sections directly and streams ULEB128 deltas straight into
`contents` via `llvm::appendLEB128`. If a malformed input produces an
out-of-order symbol address, it reports an `error()` and skips the
symbol.

To avoid calling `isCodeSection()` on every subsection, we add a
`SectionView` wrapper so `isCodeSection()` can accept either a `Section`
or an `InputSection`, and cache its result across consecutive inputs

    [10 lines not shown]
DeltaFile
+129-0lld/test/MachO/function-starts.s
+36-21lld/MachO/SyntheticSections.cpp
+12-1lld/MachO/InputSection.h
+5-5lld/MachO/ICF.cpp
+3-3lld/MachO/Writer.cpp
+2-3lld/MachO/InputSection.cpp
+187-332 files not shown
+189-358 files

LLVM/project 4bfe5ad — clang/lib/Basic/Targets Mips.h, clang/test/Preprocessor init-mips.c

[Mips] Set _MIPS_SPFPSET to 16 before MIPS32 with 32-bit FPRs (#246579)

Before MIPS32, single-precision arithmetic can't use the odd FPRs when
the FPRs are 32 bits wide, and the backend doesn't use them there.
Clang still defined _MIPS_SPFPSET as 32 for MIPS I, and for MIPS II to
MIPS IV with -mfp32. Define it as 16 there, as GCC does. A single-float
FPU such as the R5900 has 32 single-precision FPRs, so single-float is
not changed.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+32-0clang/test/Preprocessor/init-mips.c
+10-4llvm/lib/Target/Mips/MipsSubtarget.cpp
+13-0clang/lib/Basic/Targets/Mips.h
+10-2llvm/test/CodeGen/Mips/pre-mips32-no-odd-spreg.ll
+65-64 files

LLVM/project 46b440e — llvm/lib/Transforms/Scalar GVN.cpp

fixup! [GVN] Drop bitcast in PointerUsesQueue. NFC
DeltaFile
+13-30llvm/lib/Transforms/Scalar/GVN.cpp
+13-301 files

LLVM/project 2d0bc66 — llvm/lib/Support SourceMgrDiagnosticVerifier.cpp, llvm/test/tools/llvm-mc/verify include.s

[Support][mlir] Check verify directives in buffers without diagnostics (#233307)

Buffers added after the verifier was created (e.g. `.include`d files)
were only scanned when a diagnostic was reported in them, so their
directives were never checked if they produced no diagnostics. Scan all
buffers in `verify()` and when looking for `@unknown` directives, and
make calling `verify()` again not report the same directives twice.

This means callers no longer need to scan their buffers up front, so
we can drop that from llvm-mc and MLIR's handler.

Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/233307
DeltaFile
+11-6llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+0-6mlir/lib/IR/Diagnostics.cpp
+3-2llvm/test/tools/llvm-mc/verify/include.s
+0-4llvm/tools/llvm-mc/llvm-mc.cpp
+14-184 files

LLVM/project ce8aac5 — llvm/include/llvm/Support SourceMgrDiagnosticVerifier.h, llvm/lib/Support SourceMgrDiagnosticVerifier.cpp

[Support] Track verify directives per buffer instead of per file name (#233306)

Expected diagnostics were looked up by by buffer identifier, so buffers
with the same name shared one list, and a diagnostic in one buffer could
match a directive in another. Use the buffer as the key instead and
check them in registration order to be deterministic.

Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/233306
DeltaFile
+13-18llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+4-9llvm/include/llvm/Support/SourceMgrDiagnosticVerifier.h
+1-5llvm/test/tools/llvm-mc/verify/include-twice.s
+18-323 files

LLVM/project eaa0198 — llvm/lib/Support SourceMgrDiagnosticVerifier.cpp, llvm/test/tools/llvm-mc/verify highlight.s

[Support][mlir] Highlight the whole directive in verifier errors (#233309)

The highlighted range started at the directive but had the length of the
expected text, so it usually ended in the middle of the directive.
Highlight up to and including the closing `}}` instead.

Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/233309
DeltaFile
+2-3llvm/test/tools/llvm-mc/verify/highlight.s
+2-2llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+1-1mlir/docs/Diagnostics.md
+5-63 files

LLVM/project 71c6d97 — llvm/lib/Support SourceMgrDiagnosticVerifier.cpp, llvm/test/tools/llvm-mc/verify line-offsets.s

[Support] Fix parsing of line offsets in verify directives (#233305)

`@+N` and `@-N` offsets were parsed with `getAsInteger(0, ...)` and the
result was never checked. So `@+010` was read as octal (8), `@+08`
failed to parse and left the offset uninitialized, and offsets before
the start or past the end of the file silently wrapped around.

Always force decimal parsing and report an error if they are invalid or
out of bounds. Line 0 is still allowed because MLIR uses it for the
implicit top-level module.

Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/233305
DeltaFile
+27-4llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+11-13llvm/test/tools/llvm-mc/verify/line-offsets.s
+38-172 files

LLVM/project dc5925d — llvm/test/tools/llvm-mc/verify highlight.s include.s

[Support][llvm-mc] Add baseline tests for SourceMgrDiagnosticVerifier bugs (#236283)

These will be fixed by the following commits.

Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/236283
DeltaFile
+53-0llvm/test/tools/llvm-mc/verify/line-offsets.s
+17-0llvm/test/tools/llvm-mc/verify/include-twice.s
+14-0llvm/test/tools/llvm-mc/verify/highlight.s
+14-0llvm/test/tools/llvm-mc/verify/include.s
+98-04 files

LLVM/project a6a28fc — llvm/test/MC/RISCV rv64dc-valid.s xqciint-invalid.s

[RISC-V][MC] Remove dead CHECK lines from converted --verify tests (#238224)

These CHECK lines used prefixes that no RUN line passed to FileCheck, so
they were never checked and the conversion to --verify left them alone.

Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/238224
DeltaFile
+2-4llvm/test/MC/RISCV/xqciint-invalid.s
+0-4llvm/test/MC/RISCV/rv64dc-valid.s
+2-82 files

LLVM/project 671ac47 — mlir/lib/Bindings/Python IRCore.cpp, mlir/test/python/ir diagnostic_handler.py

[mlir][python] Add Location.emit_warning (#246916)

Expose `mlirEmitWarning`, mirroring `Location.emit_error`.
DeltaFile
+18-0mlir/test/python/ir/diagnostic_handler.py
+11-0mlir/lib/Bindings/Python/IRCore.cpp
+29-02 files

LLVM/project 0111906 — libc/src/__support c_string.h, libc/src/__support/macros attributes.h

[libc][test] Fix dangling temporary CString pointers in unit tests (#241063)

libc_make_test_file_path returns a temporary CString wrapping an owning
cpp::string. Passing its implicit const char * conversion directly to
TESTONLY_set_group_path (which stores the raw pointer without copying in
getgrouplist_test.cpp and initgroups_test.cpp) leaves a dangling heap
pointer once the full-expression ends whenever the filename exceeds
cpp::string's short-string buffer.

Annotate CString's pointer and string_view accessors with
LIBC_LIFETIMEBOUND so Clang diagnoses temporary lifetime escapes at
compile time, allow default and move construction/assignment on CString
for test fixture members, and keep the CString objects alive in
getgrouplist_test and initgroups_test.

Assisted-by: Gemini
DeltaFile
+56-0libc/test/src/__support/c_string_test.cpp
+16-6libc/src/__support/c_string.h
+13-0libc/test/src/__support/CMakeLists.txt
+11-0utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel
+6-0libc/src/__support/macros/attributes.h
+3-2libc/test/src/grp/getgrouplist_test.cpp
+105-83 files not shown
+111-109 files

LLVM/project 98153be — mlir/include/mlir/Bindings/Python IRCore.h, mlir/lib/Bindings/Python IRCore.cpp

[mlir][python] Add Operation.is_ancestor and is_proper_ancestor (#246845)

Expose `mlirOperationIsAncestor` and `mlirOperationIsProperAncestor`.
DeltaFile
+34-0mlir/lib/Bindings/Python/IRCore.cpp
+24-0mlir/test/python/ir/operation.py
+8-0mlir/include/mlir/Bindings/Python/IRCore.h
+66-03 files

LLVM/project 244796d — llvm/test/Transforms/LoopVectorize/AArch64 epilogue-remaining-iterations-scalar-epilogue.ll dead-vector-loop-scalable.ll, llvm/test/Transforms/LoopVectorize/X86 transform-narrow-interleave-to-widen-memory-epilogue-vec.ll

[LV] Add tests with dead vector loops (NFC). (#247011)

Add tests where the main or epilogue vector loop is dead due to the trip
count, with VF and IC chosen by the cost model or forced by the user.
DeltaFile
+564-0llvm/test/Transforms/LoopVectorize/AArch64/dead-epilogue-vector-loop.ll
+523-2llvm/test/Transforms/LoopVectorize/AArch64/dead-vector-loop-trip-count.ll
+295-0llvm/test/Transforms/LoopVectorize/AArch64/dead-epilogue-vector-loop-scalable.ll
+249-0llvm/test/Transforms/LoopVectorize/AArch64/dead-vector-loop-scalable.ll
+192-0llvm/test/Transforms/LoopVectorize/AArch64/epilogue-remaining-iterations-scalar-epilogue.ll
+188-0llvm/test/Transforms/LoopVectorize/X86/transform-narrow-interleave-to-widen-memory-epilogue-vec.ll
+2,011-214 files not shown
+3,084-9920 files

LLVM/project ba708f0 — llvm/lib/Transforms/Vectorize VPlan.h

[VPlan] Remove redundant execute/printRecipe declarations (NFC) (#247012)

VPRecipeWithIRFlags, VPHeaderPHIRecipe and VPWidenInductionRecipe
re-declare the pure virtual VPRecipeBase::execute (and VPHeaderPHIRecipe
also VPRecipeBase::printRecipe) as pure virtual with the same signature,
which has no effect.

VPInterleaveBase::execute is unreachable: VPInterleaveBase is abstract
(clone is pure virtual) and both VPInterleaveRecipe and
VPInterleaveEVLRecipe override execute.

Assisted-by: Opus 5.5
DeltaFile
+0-18llvm/lib/Transforms/Vectorize/VPlan.h
+0-181 files

LLVM/project df864ab — llvm/include/llvm/Support SourceMgrDiagnosticVerifier.h, llvm/test/MC/RISCV rv64zalasr-invalid.s rv64c-invalid.s

[nspr] initial commit
DeltaFile
+16-3llvm/test/tools/llvm-mc/verify/basic.s
+12-4llvm/include/llvm/Support/SourceMgrDiagnosticVerifier.h
+6-6llvm/test/MC/RISCV/rv64zalasr-invalid.s
+6-6llvm/test/MC/RISCV/rv64c-invalid.s
+6-6llvm/test/MC/RISCV/rv32zalasr-invalid.s
+6-6llvm/test/MC/RISCV/rv32i-invalid.s
+52-3112 files not shown
+89-5718 files

LLVM/project f53f6a2 — llvm/include/llvm/Support SourceMgrDiagnosticVerifier.h, llvm/lib/Support SourceMgrDiagnosticVerifier.cpp

[nspr] initial commit
DeltaFile
+16-3llvm/test/tools/llvm-mc/verify/basic.s
+12-4llvm/include/llvm/Support/SourceMgrDiagnosticVerifier.h
+6-6llvm/test/MC/RISCV/rv64c-invalid.s
+6-6llvm/test/MC/RISCV/rv32zalasr-invalid.s
+6-6llvm/test/MC/RISCV/rv32i-invalid.s
+6-6llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+52-3112 files not shown
+89-5718 files

LLVM/project 21bd29e — llvm/lib/Support SourceMgrDiagnosticVerifier.cpp, llvm/test/tools/llvm-mc/verify include.s

[nspr] initial commit
DeltaFile
+11-6llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+0-6mlir/lib/IR/Diagnostics.cpp
+3-2llvm/test/tools/llvm-mc/verify/include.s
+0-4llvm/tools/llvm-mc/llvm-mc.cpp
+14-184 files

LLVM/project b33eb78 — llvm/lib/Support SourceMgrDiagnosticVerifier.cpp

restack
DeltaFile
+2-2llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+2-21 files

LLVM/project 6a96b75 — llvm/include/llvm/Support SourceMgrDiagnosticVerifier.h, llvm/lib/Support SourceMgrDiagnosticVerifier.cpp

[nspr] initial commit
DeltaFile
+13-18llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+4-9llvm/include/llvm/Support/SourceMgrDiagnosticVerifier.h
+1-5llvm/test/tools/llvm-mc/verify/include-twice.s
+18-323 files

LLVM/project 8cfd387 — llvm/lib/Support SourceMgrDiagnosticVerifier.cpp, llvm/test/tools/llvm-mc/verify highlight.s

[nspr] initial commit
DeltaFile
+2-3llvm/test/tools/llvm-mc/verify/highlight.s
+2-2llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+1-1mlir/docs/Diagnostics.md
+5-63 files

LLVM/project 9a42fde — llvm/lib/Support SourceMgrDiagnosticVerifier.cpp, llvm/test/tools/llvm-mc/verify line-offsets.s

[nspr] initial commit
DeltaFile
+27-4llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+11-13llvm/test/tools/llvm-mc/verify/line-offsets.s
+38-172 files

LLVM/project 7b26925 — llvm/test/tools/llvm-mc/verify highlight.s include.s, llvm/unittests/Support SourceMgrDiagnosticVerifierTest.cpp

[nspr] update
DeltaFile
+0-108llvm/unittests/Support/SourceMgrDiagnosticVerifierTest.cpp
+53-0llvm/test/tools/llvm-mc/verify/line-offsets.s
+17-0llvm/test/tools/llvm-mc/verify/include-twice.s
+14-0llvm/test/tools/llvm-mc/verify/highlight.s
+14-0llvm/test/tools/llvm-mc/verify/include.s
+0-13mlir/test/mlir-opt/verify-diagnostics-highlight.mlir
+98-1212 files not shown
+98-1238 files

LLVM/project 2ee5d1e — llvm/unittests/Support CMakeLists.txt SourceMgrDiagnosticVerifierTest.cpp, llvm/utils/gn/secondary/llvm/unittests/Support BUILD.gn

[nspr] initial commit
DeltaFile
+108-0llvm/unittests/Support/SourceMgrDiagnosticVerifierTest.cpp
+13-0mlir/test/mlir-opt/verify-diagnostics-highlight.mlir
+1-0llvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
+1-0llvm/unittests/Support/CMakeLists.txt
+123-04 files

LLVM/project b7b9540 — llvm/test/MC/RISCV rv64dc-valid.s xqciint-invalid.s

[nspr] initial commit
DeltaFile
+2-4llvm/test/MC/RISCV/xqciint-invalid.s
+0-4llvm/test/MC/RISCV/rv64dc-valid.s
+2-82 files

LLVM/project 56d1cf7 — llvm/test/MC/RISCV xqcicm-invalid.s xqcibi-invalid.s, llvm/test/MC/RISCV/rvv vsetvl.s

[RISC-V][MC] Convert remaining diagnostic tests to llvm-mc --verify (#238223)

Convert the remaining RISC-V MC diagnostic tests (41 files: 2 newly
convertible tests, Relocations/leb128.s and rvv/xsfvfofp4min.s, plus 39
tests that need manual changes on top of
`convert_mc_test_to_verify.py --inline`):

- Add 273 directives for diagnostics that the FileCheck lines did not
  check, mostly "invalid instruction" (154) and "instruction requires
  the following: ..." from RUN lines without the extension (e.g. the
  xqci*, xmips, xsmtvdot*, rvzacas, and zicfiss tests).
- Move directives that the script attached to the wrong instruction
  because their CHECK lines had no line numbers (mostly the *c-valid.s
  and *zacas-valid.s tests).
- Fix 8 directives in rv32c-fuzzed-invalid.s whose CHECK lines only
  matched the echoed source line rather than the real diagnostic.

Assisted-by: AI tooling
DeltaFile
+151-154llvm/test/MC/RISCV/rv32i-invalid.s
+134-130llvm/test/MC/RISCV/xqcicli-invalid.s
+115-127llvm/test/MC/RISCV/xqcia-invalid.s
+110-100llvm/test/MC/RISCV/xqcibi-invalid.s
+59-112llvm/test/MC/RISCV/rvv/vsetvl.s
+79-88llvm/test/MC/RISCV/xqcicm-invalid.s
+648-71135 files not shown
+1,598-1,75241 files

LLVM/project ee58998 — llvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor value-simplify-duplicate-scope.ll

[Attributor] Merge the scopes of potential values with a `|=` (#246909)

`recurseForValue` merges the scopes of a value with `+=`. If a value
appears more than once in the values of one scope, the sum is not a
valid scope.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+38-0llvm/test/Transforms/Attributor/value-simplify-duplicate-scope.ll
+2-1llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+40-12 files