LLVM/project c3b1603 — clang/lib/Sema SemaDeclAttr.cpp

fixup! [Clang][Smea] Accept weak reference after declaration
DeltaFile
+3-2clang/lib/Sema/SemaDeclAttr.cpp
+3-21 files

LLVM/project e22bf29 — clang/lib/Parse ParsePragma.cpp

[clang] Explicitly discard the vectorize_width token consume result
DeltaFile
+1-1clang/lib/Parse/ParsePragma.cpp
+1-11 files

LLVM/project 81604f1 — clang/lib/Driver/ToolChains Clang.cpp

[NFC][Clang][Driver] Simplify return path slicing in addCompDirArg (#247431)

Since CC1Flag is now a parameter, assert that it ends with '=' and
offset by CC1Flag.size() instead of scanning for '='.

Follow-up to #247135.
DeltaFile
+2-2clang/lib/Driver/ToolChains/Clang.cpp
+2-21 files

LLVM/project fd5397f — llvm/lib/Target/Hexagon HexagonDepIICScalar.td, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll

Merge branch 'main' into users/aokblast/clang/sema_accept_weak_after_decl
DeltaFile
+19,530-19,493llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+29,293-0llvm/test/CodeGen/X86/vector-interleave7-i16.ll
+29,228-0llvm/test/CodeGen/X86/vector-interleaved7-i8.ll
+15,508-13,586llvm/lib/Target/Hexagon/HexagonDepIICScalar.td
+27,225-0llvm/test/CodeGen/X86/vector-interleave7-i32.ll
+26,140-0llvm/test/CodeGen/X86/vector-deinterleave7-i8.ll
+146,924-33,07924,496 files not shown
+1,918,758-613,08824,502 files

LLVM/project f44514a — flang/test/Driver offload-arch-tool.f90

Update flang/test/Driver/offload-arch-tool.f90

Co-authored-by: Tarun Prabhu <tarun at lanl.gov>
DeltaFile
+1-1flang/test/Driver/offload-arch-tool.f90
+1-11 files

LLVM/project 9a3e8d8 — llvm/lib/Object WasmObjectFile.cpp, llvm/test/ObjectYAML/wasm function_section_no_code.yaml

[Object][Wasm] Initialize functions without a code section (#245486)

`parseFunctionSection` creates `WasmFunction` objects before their code
bodies are parsed. If an object has no Code section, `Comdat` remains
uninitialized, and `obj2yaml` can use it to index an empty COMDAT list
when dumping the linking section.

Value-initialize each function and set its index and `UINT32_MAX` COMDAT
sentinel in `parseFunctionSection`, instead of relying on
`parseCodeSection`. Computing the index there also preserves COMDAT
function indices when imports are present and the Code section is
absent. Keep the existing support for inspecting objects without a Code
section.

Fixes #239399.
DeltaFile
+81-0llvm/test/ObjectYAML/wasm/function_section_no_code.yaml
+4-4llvm/lib/Object/WasmObjectFile.cpp
+85-42 files

LLVM/project 73554da — mlir/lib/Dialect/GPU/Transforms EliminateBarriers.cpp, mlir/test/Dialect/GPU barrier-elimination.mlir

[mlir][gpu] Treat memref.copy as non-capturing in barrier elimination (#246902)

getKnownCapturingStatus treated memref.copy as an unknown user, so a
fresh allocation copied into was considered captured and could alias any
memref of unknown origin. This kept barriers that are not needed.
memref.copy only reads and writes the elements of its operands, so mark
it as non-capturing, like memref.dealloc.

Fixes #227542

Assisted-by: Claude Code
DeltaFile
+38-0mlir/test/Dialect/GPU/barrier-elimination.mlir
+1-1mlir/lib/Dialect/GPU/Transforms/EliminateBarriers.cpp
+39-12 files

LLVM/project afa52a6 — llvm/test/MC/RISCV compressed-relocations.s rv64-relax-all.s

[RISCV,test] Improve branch tests under linker relaxation (#247435)

Fix misspelled prefixes in long-conditional-jump.s.
Add +relax tests for long branch with --mc-relax-all.
DeltaFile
+20-20llvm/test/MC/RISCV/long-conditional-jump.s
+4-4llvm/test/MC/RISCV/compressed-relocations.s
+8-0llvm/test/MC/RISCV/rv64-relax-all.s
+32-243 files

LLVM/project 58037e8 — llvm/lib/SandboxIR Tracker.cpp, llvm/unittests/SandboxIR TrackerTest.cpp

[SandboxIR][Tracker] Fix bug in SnapshotChecker (#246098)

This patch fixes the issue in Tracker::accept() when not accepting all
that would not update the snapshot tracker leading to false positives in
EXPENSIVE_CHECKS.
DeltaFile
+7-0llvm/unittests/SandboxIR/TrackerTest.cpp
+3-0llvm/lib/SandboxIR/Tracker.cpp
+10-02 files

LLVM/project 45d2e3e — clang/lib/Driver/ToolChains Clang.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+2-2clang/lib/Driver/ToolChains/Clang.cpp
+2-21 files

LLVM/project d31dc13 — clang/lib/Driver/ToolChains Clang.cpp

[Clang][Driver][NFC] Generalize addDebugCompDirArg to addCompDirArg (#247135)

Generalize `addDebugCompDirArg` into `addCompDirArg`, which takes the
specific option and cc1 flag,
and use it for both `-fdebug-compilation-dir=` and
`-fcoverage-compilation-dir=`.

This prepares for handling `-fsanitize-compilation-dir=` the same way.

Part of #246884.

Signed-off-by: Björn Svensson <bjorn.a.svensson at est.tech>
DeltaFile
+20-27clang/lib/Driver/ToolChains/Clang.cpp
+20-271 files

LLVM/project acfaa6d — llvm/lib/CodeGen BranchFolding.cpp, llvm/test/CodeGen/X86 pseudo-probe-tail-merging.mir

[CodeGen] Preserve pseudo-probe contexts when matching common tails (#244667)

PR #219502 introduced `haveSamePseudoProbeContext()` to stop the
backward scan at probes or probe-annotated calls from different inline
contexts. The suffix already matched can still be shared when doing so
preserves the probes’ sampling locations. For example, two calls from
different contexts can stay in their original blocks and share a common
epilogue.

1. Tail merging can leave probes behind in the original blocks as seen
in repro: https://godbolt.org/z/6ndooP4oW.
In the repro, the matched suffix is `MOV`, `LEA`, and `RET`. Sharing it
leaves each original block with its own probe and at most a forwarding
jump. Both probes disappear with tail merging enabled and survive with
it disabled.
Branch folding can bypass a forwarding block, and `PseudoProbeInserter`
removes dangling probes from blocks without real instructions. At a
context mismatch, check the prefix that would remain in each block.
Reject the merge if either prefix would contain a probe without real

    [31 lines not shown]
DeltaFile
+377-2llvm/test/CodeGen/X86/pseudo-probe-tail-merging.mir
+36-1llvm/lib/CodeGen/BranchFolding.cpp
+413-32 files

LLVM/project 83d5bc6 — llvm/lib/Transforms/InstCombine InstCombineSimplifyDemandedFP.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-frexp.ll

[InstCombine] Use input denormal mode when demanding subnormals for `frexp` in `SimplifyDemandedUseFPClass` (#246007)

Use the input denormal mode to determine which subnormal input classes
can produce a demanded signed zero in `frexp`. Previously, this treated
every input mode as dynamic, which blocked valid folds under IEEE,
PreserveSign, and PositiveZero.

Fixes #229317
DeltaFile
+189-24llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-frexp.ll
+19-10llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemandedFP.cpp
+208-342 files

LLVM/project 809f65f — llvm/lib/Object ELFObjectFile.cpp, llvm/test/tools/llvm-objdump/ELF/Mips eflags-features.test

[Object][Mips] Don't crash on unknown e_flags in getMIPSFeatures (#247403)

getMIPSFeatures() hit llvm_unreachable for any EF_MIPS_ARCH or
EF_MIPS_MACH value it did not list. The flags come from the input
file, so llvm-objdump -d aborted on objects with EF_MIPS_MACH_5900,
which LLVM itself emits for -mcpu=r5900, or with EF_MIPS_MACH_LS3A.

Ignore values that have no matching feature, and map
EF_MIPS_MACH_5900 to the r5900 feature.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+37-0llvm/test/tools/llvm-objdump/ELF/Mips/eflags-features.test
+7-5llvm/lib/Object/ELFObjectFile.cpp
+44-52 files

LLVM/project e9ffd14 — llvm/test/CodeGen/Mips/GlobalISel/llvm-ir memset_inline.ll memcpy_inline.ll

[Mips][GlobalISel] Add baseline tests for inline memory operations
DeltaFile
+761-0llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/memcpy_inline.ll
+431-0llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/memset_inline.ll
+1,192-02 files

LLVM/project b7e4f47 — llvm/test/CodeGen/Mips/GlobalISel/llvm-ir memset_inline.ll memcpy_inline.ll, llvm/test/CodeGen/RISCV/GlobalISel memset-inline.ll memcpy-inline.ll

[GlobalISel] Halve the bit width when lowering memory operations
DeltaFile
+167-564llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/memcpy_inline.ll
+119-282llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/memset_inline.ll
+40-120llvm/test/CodeGen/RISCV/GlobalISel/memcpy-inline.ll
+79-32llvm/test/CodeGen/RISCV/GlobalISel/memset-inline.ll
+4-14llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-memcpy-inline.mir
+4-10llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-memset-inline.mir
+413-1,0223 files not shown
+420-1,0349 files

LLVM/project c1c5cc3 — llvm/test/CodeGen/RISCV/GlobalISel memset-inline.ll memcpy-inline.ll

[RISCV][GlobalISel] Add baseline tests for aligned inline memory operations
DeltaFile
+208-0llvm/test/CodeGen/RISCV/GlobalISel/memcpy-inline.ll
+56-0llvm/test/CodeGen/RISCV/GlobalISel/memset-inline.ll
+264-02 files

LLVM/project b8f2bc3 — clang-tools-extra/clang-tidy/utils UseRangesCheck.cpp, clang-tools-extra/docs ReleaseNotes.md

[clang-tidy] Fix `modernize-use-ranges` fix-it for containers accessed through a pointer (#226739)

Fixes the pointer derenferencing with the help of
`fixit::formatDereference`. Most of the Diff is caused by
`RangeArg`refactoring.

Did not use StringRef as `formatDereference` returns a `std::string`.

Assisted by Codex for codebase exploration and utility usage.

Fixes #188257 

Godbolt link from original issuer:
https://godbolt.org/z/7af31ox3j
DeltaFile
+26-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges.cpp
+14-7clang-tools-extra/clang-tidy/utils/UseRangesCheck.cpp
+2-0clang-tools-extra/docs/ReleaseNotes.md
+42-73 files

LLVM/project 20afa98 — clang/lib/Sema TreeTransform.h

[Clang][SYCL] Add a voided use of a variable used only in an assertion. (#247412)

The tree transform for UnresolvedSYCLKernelCallStmt contains a call to
SemaSYCL::GetSYCLKernelInfoClassSpecializationType() that is necessary
to provoke an implicit declaration of the requested specialization. The
return value is only used in an assertion which resulted in an unused
variable error in builds with assertions disabled. A voided use of the
variable has been added to suppress the error.
DeltaFile
+1-0clang/lib/Sema/TreeTransform.h
+1-01 files

LLVM/project b5fc07d — lld/ELF SyntheticSections.cpp OutputSections.cpp

[ELF] Finalize merge sections in parallel (#246841)

Finalizes merge sections and looks up tail-merged string offsets with
`parallelForEach`. The output is byte-identical at any `--threads`
value.

The gain comes from tail merging, which only happens at -O2 and above.
DeltaFile
+2-2lld/ELF/OutputSections.cpp
+2-1lld/ELF/SyntheticSections.cpp
+4-32 files

LLVM/project b4871b8 — llvm/lib/Target/AMDGPU AMDGPUAttributor.cpp, llvm/test/CodeGen/AMDGPU duplicate-attribute-indirect.ll simple-indirect-call.ll

[AMDGPU] Re-enable AAInstanceInfo in AMDGPUAttributor

This was enabled and then disabled because of its compile time impact. This
recent changes, the compile time issue should have been resolved.
DeltaFile
+13-5llvm/test/CodeGen/AMDGPU/amdgpu-attributor-accesslist-offsetbins-out-of-sync.ll
+3-6llvm/test/CodeGen/AMDGPU/simple-indirect-call-2.ll
+5-3llvm/test/CodeGen/AMDGPU/direct-indirect-call.ll
+4-2llvm/test/CodeGen/AMDGPU/simple-indirect-call.ll
+2-3llvm/test/CodeGen/AMDGPU/duplicate-attribute-indirect.ll
+1-1llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
+28-206 files

LLVM/project c128eb5 — flang/lib/Semantics compute-offsets.cpp, flang/test/Semantics equivalence-non-data-object.f90

[Flang] Avoid crash on invalid EQUIVALENCE objects (#244982)

An invalid EQUIVALENCE statement may introduce a symbol that is not a
data object into later offset computation. ComputeOffsetsHelper assumes
such symbols have ObjectEntityDetails when assigning COMMON block
information, which can cause a crash.

Check for ObjectEntityDetails before accessing object-specific
information.

Fixes https://github.com/llvm/llvm-project/issues/242269
DeltaFile
+16-0flang/test/Semantics/equivalence-non-data-object.f90
+3-1flang/lib/Semantics/compute-offsets.cpp
+19-12 files

LLVM/project 91e7e85 — llvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor value-simplify-call-chain.ll

[Attributor] Do not copy large value sets in `AAPotentialValues`

`AAPotentialValuesImpl::recurseForValue` copies all values of another position
into the state. For example, if a callee returns one of its arguments, the call
result takes the values of the call site operand. In a chain of calls where each
call gets the result of the previous call, each call result then has one more
value than the previous one. A call result also sees the new values of the
previous call only in the next fixpoint iteration, so a chain of N calls needs N
iterations, and a long chain hits the iteration limit.

In this PR, we just limit the number of values to copy to 7, and use the value
of the position itself otherwise. 7 is a magic number here, but it is sufficient
for most cases (telling from the fact that no existing test is affected by this
change).

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+58-0llvm/test/Transforms/Attributor/value-simplify-call-chain.ll
+11-0llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+69-02 files

LLVM/project 4d401fb — llvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor value-simplify-pointer-info.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
+75-0llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll
+35-12llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+110-122 files

LLVM/project 1a3580b — clang/include/clang/Sema SemaSYCL.h, clang/lib/Sema SemaDecl.cpp SemaSYCL.cpp

[Clang][SYCL] Call sycl_kernel_launch with a kernel info type rather than a kernel name type. (#208958)

Previously, implicit calls to the sycl_kernel_launch() function
provided by the SYCL runtime library passed a kernel name type as the
sole template argument and a name for the generated kernel entry point
function as a string literal for the first function argument. This
design had two issues:
- The name of the offload kernel entry point was only communicated to
the SYCL runtime library at run-time despite being known at
compile-time.
- The interface left little room for future extension.

With this change, a kernel information type that contains both the
kernel name type and the name of the offload kernel entry point as
members is passed as the sole template argument and there is no longer a
need to pass an implicit function argument. The kernel information type
has the following structure where kernel-info, kernel-name-type, and
kernel-entry-point-name are exposition only names.
  struct kernel-info {

    [18 lines not shown]
DeltaFile
+278-45clang/lib/Sema/SemaSYCL.cpp
+102-102clang/test/SemaSYCL/sycl-kernel-launch.cpp
+70-23clang/include/clang/Sema/SemaSYCL.h
+36-46clang/test/ASTSYCL/ast-dump-sycl-kernel-call-stmt.cpp
+32-37clang/test/CodeGenSYCL/kernel-caller-entry-point.cpp
+25-33clang/lib/Sema/SemaDecl.cpp
+543-28643 files not shown
+743-42849 files

LLVM/project 171e58d — mlir/lib/Transforms/Utils CSE.cpp, mlir/test/Transforms cse-overlapping-reads.mlir cse-effects-cache.mlir

[mlir][CSE] Avoid repeated effect scans across overlapping read queries (#243707)

CSE caches scan progress separately for each starting read, so queries
with different starting operations repeatedly inspect overlapping
intervals. Maintain an incrementally populated, block-local index of
write and unknown-effect operations, with a per-read cursor into the
index. This avoids rescanning intervening operations that are known not
to write, while preserving resource-aware write checks and early exits
on blockers.

On the CLIP reproducer, this reduces intermediate-operation effect
checks from 2,590,482 to 7,483 with identical output. The regression
test is reduced from that input and adapted to upstream dialects.

Fixes #243418
DeltaFile
+75-82mlir/lib/Transforms/Utils/CSE.cpp
+118-0mlir/test/Transforms/cse.mlir
+50-0mlir/test/Transforms/cse-effects-cache.mlir
+38-0mlir/test/Transforms/cse-overlapping-reads.mlir
+281-824 files

LLVM/project ec91206 — clang/lib/Basic/Targets LoongArch.cpp LoongArch.h, clang/test/CodeGen/LoongArch atomic-128.c

[clang][LoongArch] Make 16-byte atomics lock-free with SCQ and LSX

Set MaxAtomicInlineWidth to 128 and define
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 when both SCQ and LSX are available,
matching GCC. __atomic_always_lock_free(16, 0) now returns true for e.g.
-march=la664, and the -Watomic-alignment warning is no longer emitted for
16-byte atomics.
DeltaFile
+34-0clang/test/CodeGen/LoongArch/atomic-128.c
+14-0clang/test/Preprocessor/init-loongarch.c
+4-0clang/lib/Basic/Targets/LoongArch.h
+2-0clang/lib/Basic/Targets/LoongArch.cpp
+54-04 files

LLVM/project ac4a6d4 — llvm/lib/Target/LoongArch LoongArchInstrInfo.td LoongArchISelLowering.cpp, llvm/test/CodeGen/LoongArch/ir-instruction load-store-atomic-128.ll atomicrmw-128.ll

[LoongArch] Lower i128 atomicrmw to a single LL.D/SC.Q loop

i128 xchg/add/sub/and/or/xor/nand were expanded by AtomicExpand to an
atomic load plus a cmpxchg loop nested in an outer retry loop. Lower them
instead to pseudo instructions that are expanded after register allocation
into one loop computing the new value between LL.D/LD.D and SC.Q, like
GCC:

  .loop:
    ll.d   lo, addr, 0
    dbar   20
    ld.d   hi, addr, 8
    <op>   new_lo, new_hi, lo, hi, val_lo, val_hi
    sc.q   new_lo, new_hi, addr
    beqz   new_lo, .loop

For nand the operand is inverted outside the loop and the loop uses ORN.
Other operations (min/max, uinc_wrap, ...) still use the cmpxchg loop.
DeltaFile
+204-1,329llvm/test/CodeGen/LoongArch/ir-instruction/atomicrmw-128.ll
+28-296llvm/test/CodeGen/LoongArch/ir-instruction/load-store-atomic-128.ll
+121-0llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp
+79-4llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+21-0llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
+453-1,6295 files

LLVM/project 6b9c925 — llvm/lib/Target/LoongArch LoongArchISelLowering.h LoongArchISelLowering.cpp, llvm/test/CodeGen/LoongArch/ir-instruction load-store-atomic-128.ll atomicrmw-128.ll

[LoongArch] Support i128 atomic load, store and atomicrmw with SCQ

With +scq the maximum supported atomic size is 128 bits, but only i128
cmpxchg was lowered. i128 atomic store and atomicrmw (xchg, add, sub, and,
or, xor, ...) hit an assertion in DAGTypeLegalizer::ExpandAtomic, and i128
atomic loads were expanded to a cmpxchg loop, which writes memory.

- With LSX, lower i128 atomic load/store to a single VLD/VST, which is
  single-copy atomic for aligned 128-bit accesses (as GCC does). Fences
  are inserted for the stores as for i8/i16.
- Without LSX, expand i128 atomic store to atomicrmw xchg.
- Expand all i128 atomicrmw to a cmpxchg loop.
- Handle unordered ordering when an i128 atomic load is expanded to
  cmpxchg.
DeltaFile
+2,188-0llvm/test/CodeGen/LoongArch/ir-instruction/atomicrmw-128.ll
+673-0llvm/test/CodeGen/LoongArch/ir-instruction/load-store-atomic-128.ll
+64-1llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+3-0llvm/lib/Target/LoongArch/LoongArchISelLowering.h
+2,928-14 files

LLVM/project e7d9bdb — llvm/lib/Target/LoongArch LoongArchInstrInfo.td LoongArchExpandAtomicPseudoInsts.cpp, llvm/test/CodeGen/LoongArch/ir-instruction atomic-cmpxchg-128.ll

[LoongArch] Return an atomic snapshot from failing i128 cmpxchg

The i128 cmpxchg loop reads the low half with LL.D and the high half with
a separate LD.D. When the comparison fails, the loop exits without
executing SC.Q, so nothing guarantees that the two halves were read from
the same store, and the returned "current value" can be torn.

On comparison failure, write the loaded value back with SC.Q and retry if
the SC.Q fails, so the returned value is always a single-copy atomic
snapshot.
DeltaFile
+70-34llvm/test/CodeGen/LoongArch/ir-instruction/atomic-cmpxchg-128.ll
+29-6llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp
+1-1llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
+100-413 files