LLVM/project 42dfc4e — llvm/lib/Target/Sparc/AsmParser SparcAsmParser.cpp, llvm/test/MC/Sparc sparc-mem-asi-instructions.s sparc-asm-errors.s

[Sparc][MC] Don't report "unexpected token" after an operand error (#245208)

When an operand failed to parse, parseInstruction always reported
"unexpected token", even when the operand parser had already reported a
more specific error. So most operand errors were followed by a second,
less useful one, e.g.:

```
error: invalid register name
error: unexpected token
```

Make the operand parsers follow the ParseStatus convention, where
Failure means an error was reported and NoMatch means nothing was
consumed and no error was reported, and only report "unexpected token"
for NoMatch:

- parseSparcAsmOperand returns NoMatch for tokens it does not handle,
  and Failure only after an error.

    [19 lines not shown]
DeltaFile
+76-44llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
+44-11llvm/test/MC/Sparc/sparc-asm-errors.s
+1-2llvm/test/MC/Sparc/Relocations/data-directive-specifier.s
+1-1llvm/test/MC/Sparc/sparc-mem-asi-instructions.s
+122-584 files

LLVM/project 3649f70 — llvm/lib/Transforms/Instrumentation MemorySanitizer.cpp, llvm/test/Instrumentation/MemorySanitizer masked-store-load.ll

[msan][test] Show masked_store with zero mask incorrectly sets origin (#246161)

handleMaskedStore() unconditionally sets the origin, even in cases where
the mask ends up being zero (as evaluated at compile-time or runtime)
i.e., no bytes were stored. This PR adds a regression test case and a
TODO in the MSan instrumentation pass.

---------

Co-authored-by: Vitaly Buka <vitalybuka at google.com>
DeltaFile
+67-0llvm/test/Instrumentation/MemorySanitizer/masked-store-load.ll
+3-0llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+70-02 files

LLVM/project f5492c2 — compiler-rt/test/asan/TestCases/Linux dlopen-mixed-c-cxx.c

[ASan][test] Use %run in dlopen-mixed-c-cxx.c (#246215)

The test ran its binary directly, so it failed on targets that need an
emulator or a remote device.

Assisted-by: Claude Code
DeltaFile
+1-1compiler-rt/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c
+1-11 files

LLVM/project 14f5342 — clang/test/Analysis lifetime-end-path-notes.cpp

Update the test file.
DeltaFile
+6-6clang/test/Analysis/lifetime-end-path-notes.cpp
+6-61 files

LLVM/project d2ca9de — clang/lib/ScalableStaticAnalysis/Analyses/PointerFlow PointerFlowPairs.cpp

fix clang-format
DeltaFile
+4-2clang/lib/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowPairs.cpp
+4-21 files

LLVM/project f0a6223 — libc/test/src/math/exhaustive cos.wc sin.wc, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.960bit.ll frem.ll

Merge remote-tracking branch 'origin/main' into users/ziqingluo/PR-187125348-1
DeltaFile
+1,091,085-0libc/test/src/math/exhaustive/sin.wc
+1,090,178-0libc/test/src/math/exhaustive/cos.wc
+118,393-140,328llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+39,195-46,216llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+32,671-17,355llvm/test/CodeGen/AMDGPU/frem.ll
+21,244-27,281llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+2,392,766-231,18046,930 files not shown
+6,686,330-1,986,61246,936 files

LLVM/project bf7e013 — clang/include/clang/StaticAnalyzer/Core/PathSensitive ProgramState.h, clang/lib/StaticAnalyzer/Core RangeConstraintManager.cpp

[analyzer][NFC] Memoize inferred symbol ranges per ProgramState

The inferred range of a symbol is a pure function of the ProgramState, yet
simplifying an SVal queries the range of every sub-expression again and again
against the same state. Memoize the ranges for the most recently queried
state in RangeConstraintManager (a DenseMap<SymbolRef, RangeSet> plus the
state it belongs to; it is cleared when a different state is queried).
SymbolicRangeInferrer takes the cache as an optional, nullable pointer; the
static inferRange() call sites pass none (a stack-local cache there never got
a lookup: 0 hits over 76406 instances on the corpus below).

Why this is safe: the cache holds a ProgramStateRef, so the state stays alive
and its address cannot be recycled for a different state while it is the
cache key. To make that hold at destruction time, ConstraintMgr is now
declared last in ProgramStateManager and is destroyed first, while the state
set, the allocator and the GDM contexts are still alive. ~ProgramStateManager
is declared out of line because the defaulted one needs the complete types
used by the members. Behavior is unchanged: the diagnostics are
byte-identical on every input below, and check-clang-analysis passes

    [72 lines not shown]
DeltaFile
+38-12clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
+5-1clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
+43-132 files

LLVM/project 5016aa4 — mlir/lib/Target/SPIRV/Deserialization Deserializer.cpp, mlir/lib/Target/SPIRV/Serialization Serializer.cpp

[mlir][SPIR-V] Support Centroid and NonUniform decorations (#245443)

Adds serialization and deserialization support for the `Centroid` and
`NonUniform` SPIR-V unit decorations (both enums are already defined in
`SPIRVBase.td`).

Assisted by Google Antigravity Gemini 4.0 Neon Model
DeltaFile
+17-0mlir/test/Target/SPIRV/decorations.mlir
+2-0mlir/lib/Target/SPIRV/Serialization/Serializer.cpp
+2-0mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp
+21-03 files

LLVM/project 1892526 — mlir/include/mlir/Dialect/SPIRV/IR SPIRVGLOps.td, mlir/test/Dialect/SPIRV/IR gl-ops.mlir

[mlir][SPIR-V] Add spirv.GL.Refract op (#245349)

Adds the `spirv.GL.Refract` op corresponding to `GLSL.std.450` extended
instruction `Refract` (opcode 72).

Per the `GLSL.std.450` specification:
- `I`, `N`, and the result must all have the same floating-point scalar
or vector type.
- `eta` must be a floating-point scalar.

Serialization and deserialization are automatically generated via
`SPIRV_GLOp`.

Assisted with Google Antigravity Gemini 4 Neon model
DeltaFile
+56-0mlir/test/Dialect/SPIRV/IR/gl-ops.mlir
+45-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGLOps.td
+4-0mlir/test/Target/SPIRV/gl-ops.mlir
+105-03 files

LLVM/project 04826db — mlir/include/mlir/Dialect/SPIRV/IR SPIRVBase.td SPIRVMemoryOps.td, mlir/lib/Dialect/SPIRV/IR MemoryOps.cpp

[mlir][SPIR-V] Add spirv.ArrayLength op (#245462)

This PR adds support for  SPIR-V's `OpArrayLength` (opcode 68).

What changed:

Op definition & serialization: Registered `OpArrayLength` in
`SPIRVBase.td` and defined `SPIRV_ArrayLengthOp` in `SPIRVMemoryOps.td`
with binary serialization and deserialization.

Verification: Implemented `ArrayLengthOp::verify()` to ensure the
structure operand points to a struct ending in a RuntimeArrayType, and
that array_member correctly indexes that final member.

Assisted with Google Antigravity Gemini 4 Neon model
DeltaFile
+47-0mlir/test/Dialect/SPIRV/IR/memory-ops.mlir
+38-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMemoryOps.td
+15-1mlir/test/Target/SPIRV/memory-ops.mlir
+16-0mlir/lib/Dialect/SPIRV/IR/MemoryOps.cpp
+2-1mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
+118-25 files

LLVM/project 7c65fb7 — llvm/lib/Target/Hexagon HexagonDepInstrInfo.td HexagonDepIICHVX.td, llvm/test/CodeGen/AMDGPU memintrinsic-unroll.ll

Rebase, address comments, improvements

Created using spr 2.0.0-beta.1
DeltaFile
+15,373-16,115llvm/lib/Target/Hexagon/HexagonDepIICScalar.td
+7,746-8,018llvm/lib/Target/Hexagon/HexagonDepIICHVX.td
+4,870-4,906llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+11-7,510mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+3,141-3,182llvm/test/CodeGen/RISCV/clmul.ll
+2,907-2,931llvm/lib/Target/Hexagon/HexagonDepInstrInfo.td
+34,048-42,66211,169 files not shown
+523,858-384,64811,175 files

LLVM/project feb62bb — lld/MachO Symbols.h Relocations.h

[lld][MachO] Avoid redundant work in Writer::scanRelocations()

During relocation scanning, `Writer::scanRelocations()` looks up
`target->getRelocAttrs(r.type)` up to three times per symbol relocation
(in `scanRelocations()`, `validateSymbolRelocation()`, and
`prepareSymbolRelocation()`), tests `r.referent` twice for symbol
referents, and makes an out-of-line call to `validateSymbolRelocation()`
on every symbol relocation even though it only rejects two rare
thread-local-variable cases.

Move `validateSymbolRelocation()` (whose only caller is
`Writer::scanRelocations()`) into `Writer.cpp`, split the rare TLV
validation logic into a `LLVM_ATTRIBUTE_NOINLINE` helper, and mark
`DylibSymbol` `final` so `dysym->isTlv()` avoids a virtual call on the
fast path. Fetch `RelocAttrs` once per relocation, pass it to
`validateSymbolRelocation()` and `prepareSymbolRelocation()`, hoist
loop-invariant `target->relocAttrs` and `config->emitChainedFixups`, and
dispatch on `r.referent` once for non-subtractor relocations.
DeltaFile
+74-12lld/MachO/Writer.cpp
+0-47lld/MachO/Relocations.cpp
+6-1lld/MachO/Target.h
+0-3lld/MachO/Relocations.h
+1-1lld/MachO/Symbols.h
+81-645 files

LLVM/project 2510c11 — llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 non-power-of-2-with-adjusted-gathers.ll store-chain-split-wide-stored-values.ll

[𝘀𝗽𝗿] initial version

Created using spr 2.0.0-beta.1
DeltaFile
+53-120llvm/test/Transforms/SLPVectorizer/AArch64/or-reduction-byte-pack.ll
+53-57llvm/test/Transforms/SLPVectorizer/AArch64/reassoc-copyable-sched-deps.ll
+57-21llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+24-23llvm/test/Transforms/SLPVectorizer/AArch64/loop-accumulator-reduction.ll
+14-32llvm/test/Transforms/SLPVectorizer/AArch64/store-chain-split-wide-stored-values.ll
+22-22llvm/test/Transforms/SLPVectorizer/AArch64/non-power-of-2-with-adjusted-gathers.ll
+223-2756 files not shown
+288-32412 files

LLVM/project 9b1287d — compiler-rt/lib/sanitizer_common sanitizer_fuchsia.cpp sanitizer_suppressions.cpp, compiler-rt/test/ubsan/TestCases/Integer suppressions.cpp

[sanitizer] Ensure suppression files' buffer is null terminated. (#236826)

Function ReadFileToBuffer does not terminate string 'file_contents'.
SuppressionContext::Parse internal_strcspn expects a null-terminated
string.
The issue was found through static analysis.
DeltaFile
+5-8compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cpp
+8-0compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
+5-0compiler-rt/test/ubsan/TestCases/Integer/suppressions.cpp
+18-83 files

LLVM/project e2ef902 — clang/lib/StaticAnalyzer/Core ExplodedGraph.cpp, clang/test/Analysis lifetime-end-path-notes.cpp

Add changes back correctly.
DeltaFile
+1-2clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
+2-1clang/test/Analysis/lifetime-end-path-notes.cpp
+3-32 files

LLVM/project 4d4cc65 — clang/test/Analysis lifetime-end-path-notes.cpp

Correctly fix RUN lines, indentation, line numbering in the test file.
DeltaFile
+7-9clang/test/Analysis/lifetime-end-path-notes.cpp
+7-91 files

LLVM/project ca155a3 — clang/test/Analysis lifetime-end-path-notes.cpp

Fix line numbers in expected notes.
DeltaFile
+3-3clang/test/Analysis/lifetime-end-path-notes.cpp
+3-31 files

LLVM/project 9e6109f — clang/test/Analysis lifetime-end-path-notes.cpp

Apply nits to the test file.
DeltaFile
+4-4clang/test/Analysis/lifetime-end-path-notes.cpp
+4-41 files

LLVM/project c7a0350 — clang/lib/StaticAnalyzer/Core ExplodedGraph.cpp, clang/test/Analysis lifetime-end-path-notes.cpp

[analyzer] Skip LifetimeEnd nodes in getNextStmtForDiagnostics
DeltaFile
+51-0clang/test/Analysis/lifetime-end-path-notes.cpp
+3-0clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
+54-02 files

LLVM/project e608c99 — llvm/include/llvm/CodeGen/GlobalISel LoadStoreOpt.h, llvm/include/llvm/ExecutionEngine/Orc ObjectLinkingLayer.h

[llvm] Remove unused forward declarations (NFC) (#246828)

This patch removes unused forward declarations of classes and structs
across llvm/ that are not referenced in the same file.

Assisted-by: Antigravity
DeltaFile
+0-5llvm/lib/Target/M68k/MCTargetDesc/M68kMCTargetDesc.h
+0-5llvm/include/llvm/SandboxIR/Tracker.h
+0-5llvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h
+0-5llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+0-4llvm/lib/Target/Xtensa/MCTargetDesc/XtensaMCTargetDesc.h
+0-4llvm/lib/IR/User.cpp
+0-28176 files not shown
+0-282182 files

LLVM/project 7d7d0d3 — compiler-rt/lib/sanitizer_common sanitizer_platform_limits_posix.h sanitizer_platform_limits_posix.cpp, compiler-rt/lib/tsan/rtl tsan_interceptors_posix.cpp

[tsan] Intercept C11 mtx_* functions on glibc (#239670)

glibc implements the C11 mutex functions with its internal pthread_mutex
functions, so TSan doesn't see C11 mutexes being locked and unlocked and
reports false data races on the data they protect (#199585).

Intercept mtx_init, mtx_destroy, mtx_lock, mtx_trylock, mtx_timedlock
and mtx_unlock, forwarding to the real functions and doing what the
pthread_mutex interceptors do. mtx_recursive makes the mutex reentrant.

To avoid hardcoding C11 constants, forward mtx_plain, mtx_recursive and
mtx_timed enum values to sanitizer_platform_limits_posix.

Enable c11_mtx.c for TSan on glibc.

Assisted-by: Claude
DeltaFile
+62-0compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
+16-0compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+4-0compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+0-2compiler-rt/test/sanitizer_common/TestCases/Posix/c11_mtx.c
+82-24 files

LLVM/project d2ed2b7 — llvm/lib/Transforms/Instrumentation SanitizerCoverage.cpp, llvm/test/Instrumentation/SanitizerCoverage missing_dbg.ll

[SanitizerCoverage] Use InstrumentationIRBuilder for gated callbacks (#244789)

Gated callback paths in InjectTraceForSwitch(), InjectTraceForCmp(), and
InjectCoverageAtBlock() used a plain IRBuilder instead of
InstrumentationIRBuilder, and InjectCoverageAtBlock() did not propagate
EntryLoc. When the split point has no debug location in a function with
a DISubprogram, the inserted runtime call lacked a !dbg location.

Assisted-by: Gemini
DeltaFile
+36-32llvm/test/Instrumentation/SanitizerCoverage/missing_dbg.ll
+22-31llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
+58-632 files

LLVM/project 4af237e — llvm/lib/Transforms/Vectorize VPlanLowering.cpp VPlanConstruction.cpp, llvm/test/Transforms/LoopVectorize alias-mask.ll runtime-checks-hoist.ll

[LV] Expand runtime checks in SafeUDivMode. (#246863)

The SCEV predicate checks, memory runtime checks and alias-mask checks
are executed unconditionally before the vector loop, but may contain a
udiv that the original loop only evaluates in a predicated block, e.g.
for an address computed from a udiv under a condition that is never
true. Expanding it unguarded divides by zero or poison.

Expand them in SafeUDivMode, matching the expansion of
VPExpandSCEVRecipes. canExpandInIR no longer bails out in SafeUDivMode,
as it only accepts expressions that cannot cause UB, so hoisting of
memory checks out of outer loops is unchanged.

PR: https://github.com/llvm/llvm-project/pull/246863
DeltaFile
+211-0llvm/test/Transforms/LoopVectorize/runtime-checks-predicated-udiv.ll
+24-22llvm/test/Transforms/LoopVectorize/VPlan/memory-checks.ll
+3-1llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+2-1llvm/test/Transforms/LoopVectorize/alias-mask.ll
+2-1llvm/lib/Transforms/Vectorize/VPlanLowering.cpp
+2-1llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+244-262 files not shown
+247-288 files

LLVM/project ec153d7 — compiler-rt/lib/sanitizer_common sanitizer_platform_interceptors.h

[NFC][sanitizer_common] Flip the AIX build guard to positive (#246155)

https://github.com/llvm/llvm-project/pull/138606 added build guard
`SI_NOT_AIX`. It's a negative flag and easy to cause confusing on
double-negative.

This PR flips the flag to positive and updates all of the usages.

Assisted-by: Gemini
DeltaFile
+19-19compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+19-191 files

LLVM/project e2a85c2 — clang/lib/CodeGen CodeGenFunction.h CGExprCXX.cpp, clang/test/CodeGenCXX target-features-error.cpp

[Clang][CodeGen] Plumb SourceLocation to virtual dtor and thunk calls (#245522)

Forward the call or delete expression location through
EmitCXXDestructorCall
and EmitVirtualDestructorCall, and pass the method location from
getOrCreateVirtualFunctionPointerThunk to EmitCall.

Previously, these paths passed an empty SourceLocation to EmitCall,
causing
call-site diagnostics such as target-feature errors on virtual
destructors
(both Itanium and Microsoft ABIs) to be emitted without a file or line
number. This also prepares for passing call-site locations to UBSan kCFI
diagnostics in follow-up changes.

Assisted-by: Gemini
DeltaFile
+9-7clang/lib/CodeGen/MicrosoftCXXABI.cpp
+14-0clang/test/CodeGenCXX/target-features-error.cpp
+6-4clang/lib/CodeGen/ItaniumCXXABI.cpp
+4-4clang/lib/CodeGen/CGExprCXX.cpp
+1-0clang/lib/CodeGen/CodeGenFunction.h
+34-155 files

LLVM/project a37c671 — llvm/lib/CodeGen TargetInstrInfo.cpp, llvm/test/CodeGen/X86 machine-outliner-nomerge.ll

[CodeGen][MachineOutliner] Do not outline nomerge instructions (#245435)

Instructions carrying MachineInstr::NoMerge must retain distinct call or
trap addresses so crash reports and debuggers can attribute faults to
specific sites. Classify NoMerge instructions as Illegal in
TargetInstrInfo::getOutliningType so MachineOutliner does not merge them
into shared outlined functions.

Assisted-by: Gemini
DeltaFile
+8-4llvm/test/CodeGen/X86/machine-outliner-nomerge.ll
+3-0llvm/lib/CodeGen/TargetInstrInfo.cpp
+11-42 files

LLVM/project 75f4eea — llvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor value-simplify-call-site-returned.ll

[Attributor] Use call site values when the callee returns an argument

AAPotentialValuesCallSiteReturned takes the interprocedural values of a call
from the interprocedural return values of the callee. If the callee returns one
of its arguments, these values contain the arguments of all call sites, so each
call result also gets the values passed at all other call sites. This is not
necessary. If the callee has many call sites and the call results are passed to
other calls, the value sets also become very large.

If the callee returns only its arguments and constants, we just need to
translate these values to the call site for the interprocedural scope.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+47-0llvm/test/Transforms/Attributor/value-simplify-call-site-returned.ll
+33-12llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+80-122 files

LLVM/project 3eedecf — clang/include/clang/StaticAnalyzer/Core/PathSensitive ProgramState.h, clang/lib/StaticAnalyzer/Core ProgramState.cpp

Add back the dtor declaration for unique_ptr
DeltaFile
+3-0clang/lib/StaticAnalyzer/Core/ProgramState.cpp
+2-0clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
+5-02 files

LLVM/project fc486c8 — llvm/test/CodeGen/AMDGPU srem.ll load-global-i8.ll, llvm/test/CodeGen/RISCV clmul.ll

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+4,870-4,906llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+11-7,563mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+3,141-3,182llvm/test/CodeGen/RISCV/clmul.ll
+2,602-2,926llvm/test/CodeGen/X86/vector-compress.ll
+0-5,394llvm/test/CodeGen/AMDGPU/load-global-i8.ll
+0-5,274llvm/test/CodeGen/AMDGPU/srem.ll
+10,624-29,2458,539 files not shown
+366,378-291,7658,545 files

LLVM/project e875fd6 — llvm/test/Instrumentation/SanitizerCoverage missing_dbg.ll

[test][SanitizerCoverage] Precommit gated-callbacks debug info test (#245528)

Add a gated-callbacks RUN line to missing_dbg.ll showing that gated
runtime calls currently drop !dbg locations in functions with debug
info.

Assisted-by: Gemini
DeltaFile
+250-0llvm/test/Instrumentation/SanitizerCoverage/missing_dbg.ll
+250-01 files