LLVM/project 32636ffclang/test/CIR/CodeGen bitfields.cpp, clang/test/CIR/CodeGenCXX uncopyable-args.cpp

[CIR] Drop the stale callconv opt-out from two CIR tests (#225180)

`bitfields.cpp` was waiting on padded, packed and over-aligned record
shapes. `uncopyable-args.cpp` was waiting on parameters of an empty or
tag class. Both files now compile and check clean with the pass running,
so the `-fno-clangir-call-conv-lowering` opt-out and its TODO header are
removed and the tests exercise the pass as written. Neither file changes
a CHECK directive.

Assisted-by: Cursor / claude-opus-5
DeltaFile
+2-4clang/test/CIR/CodeGenCXX/uncopyable-args.cpp
+2-4clang/test/CIR/CodeGen/bitfields.cpp
+4-82 files

LLVM/project d6b4d4aflang/include/flang/Parser openmp-utils.h, flang/lib/Parser openmp-utils.cpp

[flang][OpenMP] Annotate some directive and clause names

There are some directives that share the same spelling, but have
different functionality. The same is true for clauses. When getting
the upper-case name of such a directive or a clause, optionally
(and by default) add an annotation about the kind of the directive
or clause.

For example, a standalone ORDERED directive will be displayed as
"ORDERED (standalone)". This was already done, for this directive,
but not in all cases.
DeltaFile
+32-4flang/lib/Parser/openmp-utils.cpp
+3-10flang/lib/Semantics/check-omp-structure.cpp
+3-3flang/test/Semantics/OpenMP/ordered01.f90
+4-2flang/include/flang/Parser/openmp-utils.h
+42-194 files

LLVM/project 1e7f457llvm/lib/Target/AMDGPU VOP3PInstructions.td, llvm/test/CodeGen/AMDGPU frem.ll mad-mix-lo-bf16.ll

[AMDGPU] Fold fpround of fadd and fsub into v_mad/fma_mixlo and mixhi

MadFmaMixFP32Pats turns (fadd x, y) into (fma x, 1.0, y) and (fsub x, y)
into (fma (-y), 1.0, x) so the mix instructions absorb the operation along
with the f16 or bf16 source modifiers. MadFmaMixFP16Pats and
MadFmaMixFP16Pats_t16 only did this for fmul, so a rounded result still
needed a separate convert for a rounding the mix instructions perform
themselves.

Unlike the f32 patterns these do not require an operand to be an fpextend
of an f16, since an fpround on the result always removes the convert. The
rewrite is exact because the mix instructions round the f32 result again
when they write the 16-bit destination, so it stays f32_to_f16(fma(x, 1.0,
y)).

Assisted-by: Claude Code Opus 5


DeltaFile
+192-285llvm/test/CodeGen/AMDGPU/GlobalISel/fdiv.f16.ll
+61-311llvm/test/CodeGen/AMDGPU/mad-mix-lo.ll
+62-145llvm/test/CodeGen/AMDGPU/mad-mix-hi.ll
+55-36llvm/test/CodeGen/AMDGPU/mad-mix-lo-bf16.ll
+26-52llvm/test/CodeGen/AMDGPU/frem.ll
+70-0llvm/lib/Target/AMDGPU/VOP3PInstructions.td
+466-8294 files not shown
+496-88510 files

LLVM/project e22f06ellvm/lib/Target/AMDGPU AMDGPUISelDAGToDAG.cpp, llvm/test/CodeGen/AMDGPU mad-mix-hi-bf16.ll mad-mix-lo-bf16.ll

[AMDGPU] Do not match an f16 extension as a bf16 mix source (#224912)

Assisted-by: Claude Code Opus 5
DeltaFile
+51-18llvm/test/CodeGen/AMDGPU/mad-mix-lo-bf16.ll
+17-6llvm/test/CodeGen/AMDGPU/mad-mix-hi-bf16.ll
+2-1llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+70-253 files

LLVM/project 9696514clang/lib/CodeGen CGOpenMPRuntimeGPU.cpp, clang/test/OpenMP nvptx_target_teams_ompx_bare_kernel_environment_codegen.cpp

[clang][openmp] Avoid generating geometry for Bare kernels (#225185)

Don't use the information from num_teams or thread_limit clauses to
initialize the Kernel Environment of bare kernels. They only support one
single dimension and for NVIDIA (only) we generate a "nnvm.maxntid"
attribute which is incompatible with the multi-dimensional launch that
happens at runtime.

Fixes a regression introduced by #223772
DeltaFile
+24-20llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+8-5clang/test/OpenMP/nvptx_target_teams_ompx_bare_kernel_environment_codegen.cpp
+0-2clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
+32-273 files

LLVM/project 82cf8d4llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging RemoteJITUtils.cpp, llvm/include/llvm/ExecutionEngine/Orc/Shared ConnectionSpec.h

[ORC] Rename ConnectionSpec's fd transport to socket:adopt (#225075)

A ConnectionSpec's transport field says what kind of thing the
descriptor names, and "fd" named a representation rather than a kind. It
also left no room for a pipe transport, which takes two descriptors and
a different server.

The transport becomes "socket", and adopting a handed-over handle
becomes an explicit "adopt" action rather than the absence of one. So
"tcp" names an endpoint to reach while "socket" names a handle already
held, and a spec states how the process came by its channel -- worth
spelling out, since "adopt", "connect" and "listen" do not carry the
same trust.

llvm-jitlink-executor takes "socket:adopt=<fd>" in place of "fd=<fd>"
and rejects any other action for that transport. The spec is an internal
handoff from llvm-jitlink in every in-tree use, so nothing else needed
updating. The class comment is rewritten around the same split and stops
describing transports that do not exist yet.

Matches the scheme the ORC runtime uses for its connector registry.
DeltaFile
+18-18llvm/include/llvm/ExecutionEngine/Orc/Shared/ConnectionSpec.h
+19-7llvm/unittests/ExecutionEngine/Orc/ConnectionSpecTest.cpp
+10-4llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp
+2-1llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/RemoteJITUtils.cpp
+1-1llvm/tools/llvm-jitlink/llvm-jitlink.cpp
+50-315 files

LLVM/project 418bedellvm/include/llvm/ExecutionEngine/Orc/Shared/SPSCI NativeDylibManagerSPSCI.h, llvm/unittests/ExecutionEngine/Orc EPCGenericDylibManagerTest.cpp

[ORC] Mangle NativeDylibManager CI names as C (#225096)

Flip the NativeDylibManager descriptors (instance + load/lookup) from
Verbatim to C, so their names carry the target's C mangling. Served by
the in-tree SimpleExecutorDylibManager; controller and executor mangle
the same specs and nothing else defines these names.

Also give the CreateFromExecutionSession test EPC the process triple,
matching the memory-manager fix (its bootstrap symbols were keyed with
the process triple but the EPC had an empty target triple).
DeltaFile
+3-3llvm/include/llvm/ExecutionEngine/Orc/Shared/SPSCI/NativeDylibManagerSPSCI.h
+2-1llvm/unittests/ExecutionEngine/Orc/EPCGenericDylibManagerTest.cpp
+5-42 files

LLVM/project 245d216llvm/lib/Transforms/Scalar LICM.cpp

fix formatting
DeltaFile
+3-3llvm/lib/Transforms/Scalar/LICM.cpp
+3-31 files

LLVM/project 679f99aclang/test/CIR/CodeGen var-arg-aggregate.c

[CIR] Tie the va_arg pair-store checks to their allocas

Assisted-by: Cursor / claude-opus-5
DeltaFile
+6-2clang/test/CIR/CodeGen/var-arg-aggregate.c
+6-21 files

LLVM/project aea2e76clang/test/CIR/CodeGen union.c paren-list-agg-init.cpp

[CIR] Regenerate CHECK lines for two callconv opt-out tests (#225189)

Neither `union.c` nor `paren-list-agg-init.cpp` is blocked by the
calling convention lowering pass any more, and both compile clean with
it running. Remove the `-fno-clangir-call-conv-lowering` opt-out and
update their CHECK lines. The coerced parameters and returns they now
pin match classic.

The bodies still differ, since CIR round-trips the record through a
fresh coerce slot, so those fragments move to the `LLVMCIR` and `OGCG`
prefixes the file already declares. Four `define` lines in
`paren-list-agg-init.cpp` wildcarded their return type and now pin it.

Assisted-by: Cursor / claude-opus-5
DeltaFile
+45-18clang/test/CIR/CodeGen/paren-list-agg-init.cpp
+35-16clang/test/CIR/CodeGen/union.c
+80-342 files

LLVM/project bd720dcllvm/include/llvm/Analysis AliasSetTracker.h, llvm/lib/Analysis AliasSetTracker.cpp

[LICM] Drop *only* per-iteration AA tags
DeltaFile
+48-27llvm/lib/Transforms/Scalar/LICM.cpp
+6-4llvm/test/Transforms/LICM/scalar-promote-aa-tags.ll
+4-3llvm/lib/Analysis/AliasSetTracker.cpp
+1-1llvm/include/llvm/Analysis/AliasSetTracker.h
+59-354 files

LLVM/project 434b00allvm/test/MC/AMDGPU gfx12_asm_vop3_err.s gfx12_asm_features.s

[AMDGPU][MC] Upstream gfx11/gfx12 true16 assembler test coverage (#223826)

Upstream new assembler test cases, covering true16 .l/.h operands and
op_sel
handling that had no upstream coverage.
DeltaFile
+75-0llvm/test/MC/AMDGPU/gfx12_asm_vop1_t16_err.s
+69-0llvm/test/MC/AMDGPU/gfx11_asm_opsel.s
+59-0llvm/test/MC/AMDGPU/gfx11_asm_t16.s
+6-0llvm/test/MC/AMDGPU/gfx11_asm_vop3_features.s
+3-0llvm/test/MC/AMDGPU/gfx12_asm_features.s
+2-0llvm/test/MC/AMDGPU/gfx12_asm_vop3_err.s
+214-06 files

LLVM/project e62aa89llvm/lib/Target/RISCV RISCVTargetTransformInfo.cpp

Address review comment
DeltaFile
+1-6llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+1-61 files

LLVM/project 6735e5allvm/lib/Target/RISCV RISCVTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/RISCV rvv-expandload-compressstore.ll

Return invalid costs for scalable LMUL 8 i8s that need split
DeltaFile
+14-4llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+5-0llvm/test/Analysis/CostModel/RISCV/rvv-expandload-compressstore.ll
+19-42 files

LLVM/project a0164c0llvm/test/Transforms/LICM scalar-promote-aa-tags.ll

Merge branch 'users/zGoldthorpe/licm-bug/precommit' into users/zGoldthorpe/licm-bug/loop-local-aa
DeltaFile
+52-0llvm/test/Transforms/LICM/scalar-promote-aa-tags.ll
+52-01 files

LLVM/project e84f7b4clang/lib/CIR/Dialect/IR CIRAttrs.cpp

[CIR] Name the memory class each factory argument sets

Assisted-by: Cursor / claude-opus-5
DeltaFile
+38-18clang/lib/CIR/Dialect/IR/CIRAttrs.cpp
+38-181 files

LLVM/project d6b79b9llvm/lib/Target/AMDGPU VOPDInstructions.td, llvm/test/MC/AMDGPU gfx1250_asm_unsupported.s gfx13_asm_vopd_errs.s

[AMDGPU] Remove two VOPD instructions from gfx1250 and gfx13.

V_DUAL_DOT2ACC_F32_F16 and V_DUAL_DOT2ACC_F32_BF16 were removed from both
gfx1250 and gfx13.

Fixes LCOMPILER-2684.
DeltaFile
+11-8llvm/lib/Target/AMDGPU/VOPDInstructions.td
+16-0llvm/test/MC/AMDGPU/gfx13_asm_vopd_errs.s
+14-0llvm/test/MC/AMDGPU/gfx1250_asm_unsupported.s
+41-83 files

LLVM/project 30bbdadllvm/test/Transforms/LICM scalar-promote-aa-tags.ll

Add pre-commit test mixing scoped alias info and tbaa
DeltaFile
+52-0llvm/test/Transforms/LICM/scalar-promote-aa-tags.ll
+52-01 files

LLVM/project e7302d9llvm/include/llvm/Analysis TargetTransformInfo.h, llvm/lib/Analysis TargetTransformInfo.cpp

[SLP] Reland: More accurately cost RISCV scalar splats (#224766)

Originally #213104, reverted due to assertion failure in cases of
reordered gather nodes.

Backends may have a fast path for splatting scalar operands (i.e. rather
than generating the splat vector, the vector instruction may be able to
take a scalar operand), for example RISCV `vfoo.vx` instructions. Pass a
hint to the TTI when costing the insert/shuffle sequence in such cases.

Fixes #212413.

Assisted By: Codex
DeltaFile
+131-55llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+67-0llvm/test/Transforms/SLPVectorizer/RISCV/reordered-gather.ll
+42-6llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+11-31llvm/test/Transforms/SLPVectorizer/RISCV/check-node-without-vector-user.ll
+29-2llvm/include/llvm/Analysis/TargetTransformInfo.h
+18-3llvm/lib/Analysis/TargetTransformInfo.cpp
+298-9723 files not shown
+401-17229 files

LLVM/project 06c7e8dllvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp

[SelectionDAG] Simplify computeKnownBits for EXTRACT_ELEMENT using KnownBits::extractBits. NFC (#225168)
DeltaFile
+1-6llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+1-61 files

LLVM/project 4a49d09llvm/lib/DebugInfo/DWARF DWARFDebugLine.cpp, llvm/unittests/DebugInfo/DWARF DWARFDebugLineTest.cpp

[DebugInfo] Fix overflow in DWARFDebugLine::SectionParser (#224770)

Adding a DWARF64 unit length can overflow and wrap back into the
section, causing an infinite loop. Saturate the addition so an
overflowing offset fails the bounds check.

rdar://186810393
DeltaFile
+20-0llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
+4-1llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
+24-12 files

LLVM/project fbbf5d2llvm/lib/Target/NVPTX NVPTXSubtarget.h NVPTXISelDAGToDAG.cpp, llvm/test/CodeGen/NVPTX volatile-local.ll

[NVPTX] Preserve volatile on atomic local loads and stores (#224719)

Local loads and stores discard atomic ordering during instruction
selection, but volatile accesses with acquire, release, or seq_cst
ordering also lose the volatile qualifier. Preserve volatile for all
valid load/store orderings when local volatile instructions are
supported. Follow up to #217764.
DeltaFile
+117-0llvm/test/CodeGen/NVPTX/volatile-local.ll
+14-15llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
+1-0llvm/lib/Target/NVPTX/NVPTXSubtarget.h
+132-153 files

LLVM/project 9906c58clang/lib/StaticAnalyzer/Checkers/WebKit RawPtrRefCallArgsChecker.cpp RawPtrRefLocalVarsChecker.cpp, clang/test/Analysis/Checkers/WebKit uncounted-local-vars.cpp

[WebKit Checkers] Trace through temporaries in tryToFindPtrOrigin (#224877)

RefPtr checking skips temporaries, reporting a path through any
temporary as unsafe. This is mostly correct, but not always. For
example, the following is a false positive:

    // makeKey() returns a temporary
    RefCountable* p = condition(makeKey()) ? guardian.ptr() : nullptr;

In the upcoming Borrow checker, it's even more important to trace
through temporaries because not tracing an expression can drop a
`lifetimebound` link, resulting in false **negatives**.

This patch adds tracing through temporaries. The logic is:

* In function call arguments, temporaries are lifetime safe because the
full expression does not end until the call returns

* In ranged for loops, temporaries are lifetime safe because lifetime

    [4 lines not shown]
DeltaFile
+82-32clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
+24-0clang/test/Analysis/Checkers/WebKit/uncounted-local-vars.cpp
+9-4clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.h
+6-2clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLocalVarsChecker.cpp
+4-1clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefCallArgsChecker.cpp
+125-395 files

LLVM/project 8e63511clang/lib/Driver/ToolChains FreeBSD.cpp, clang/test/Driver fsanitize.c

[clang][FreeBSD] Enable KASAN and KMSAN for riscv64 (#202288)

enables KASAN and KMSAN for the riscv64 freebsd target in the Clang
driver.

The corresponding FreeBSD kernel runtime support for riscv64 KASAN is
currently under active review.

Depends on: https://reviews.freebsd.org/D57381

Co-authored-by: aokblast <aokblast at FreeBSD.org>
DeltaFile
+2-1clang/lib/Driver/ToolChains/FreeBSD.cpp
+2-0clang/test/Driver/fsanitize.c
+4-12 files

LLVM/project 4efc900llvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU eliminate-frame-index-select.ll promote-alloca-homogeneous-struct.ll

Reland "[AMDGPU] PromoteAlloca: flatten homogeneous structs to vectors" (#221058)

This relands #217055

The original commit revealed a latent issue in eliminateFrameIndex in
SIRegisterInfo where SCC can be clobbered before reading it on
gfx900/gfx90a. This change itself has no known issues.
DeltaFile
+152-0llvm/test/CodeGen/AMDGPU/promote-alloca-homogeneous-struct.ll
+23-6llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+6-1llvm/test/CodeGen/AMDGPU/eliminate-frame-index-select.ll
+181-73 files

LLVM/project 8fcba44llvm/lib/Target/AMDGPU SIRegisterInfo.cpp

[AMDGPU] Update based on review feedback

Replace the lambda with the check inlined at both sites, and report a fatal
error when neither a free SGPR nor FrameReg is available, rather than
silently falling back to the spilling scavenge.
DeltaFile
+24-19llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+24-191 files

LLVM/project 895a2d3llvm/lib/Target/AMDGPU SIRegisterInfo.cpp, llvm/test/CodeGen/AMDGPU sgpr-spill-to-vmem-scc-clobber-reserved-exec-copy.mir

[AMDGPU] Use the scavenger to test whether SCC is live after MI

The register scavenger is stepped backwards to the liveness state
immediately after MI, so RS->isRegUsed(SCC) already answers "is SCC live
after MI" directly. Replace the hand-rolled test with that query.
DeltaFile
+5-6llvm/test/CodeGen/AMDGPU/sgpr-spill-to-vmem-scc-clobber-reserved-exec-copy.mir
+3-3llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+8-92 files

LLVM/project f4edcdallvm/lib/Target/AMDGPU SIRegisterInfo.cpp, llvm/test/CodeGen/AMDGPU sgpr-spill-to-vmem-scc-clobber-reserved-exec-copy.mir

[AMDGPU] Don't spill an SGPR while SCC is live in frame index lowering

When SCC is live into a scalar frame index user, the scaling path avoids
SALU ops that write SCC by computing the address in a VGPR and reading it
back with V_READFIRSTLANE_B32. If the destination of that readfirstlane is
scavenged with spilling allowed, an AMDGPU SGPR spill writes inactive
lanes, so it flips EXEC with S_NOT_B64 and clobbers SCC. Instead, scavenge
that register with AllowSpill=false.
DeltaFile
+81-45llvm/test/CodeGen/AMDGPU/sgpr-spill-to-vmem-scc-clobber-reserved-exec-copy.mir
+29-10llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+110-552 files

LLVM/project ca063cdllvm/test/CodeGen/AMDGPU sgpr-spill-to-vmem-scc-clobber-reserved-exec-copy.mir

[NFC][AMDGPU] Add tests for SCC live into a frame index user

Pre-commit tests for the case where SCC is live into a frame index user and
no SGPR is free to hold the V_READFIRSTLANE_B32 result. Scavenging one
emergency-spills an SGPR, and an SGPR spill flips EXEC with S_NOT_B64, so the
EXEC flips land between the S_CMP_EQ_U32 that defines SCC and the read of SCC
that follows, clobbering it in between.
DeltaFile
+153-0llvm/test/CodeGen/AMDGPU/sgpr-spill-to-vmem-scc-clobber-reserved-exec-copy.mir
+153-01 files

LLVM/project 6611de6llvm/lib/Target/AMDGPU SIRegisterInfo.cpp, llvm/test/CodeGen/AMDGPU eliminate-frame-index-scalar-scc-clobber.mir

[AMDGPU] Prevent SCC clobber in frame index lowering in scaling path

eliminateFrameIndex has two lowering strategies, but only one has the
proper handling for checking SCC-liveness to prevent clobbering. Unify
them with a helper function to ensure both paths handle the same
DeltaFile
+343-4llvm/test/CodeGen/AMDGPU/eliminate-frame-index-scalar-scc-clobber.mir
+9-5llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+352-92 files