LLVM/project 3ec64ddclang/docs ReleaseNotes.md ClangFormatStyleOptions.md, clang/include/clang/Format Format.h

[clang-format] Add support for additional C++ declaration specifiers in QualifierOrder (#160853)

Fixes #60866

This PR extends clang-formats `QualifierOrder` option to support
additional C++ declaration specifiers, addressing the limitation where
many common qualifiers were not recognized.

## Problem

Previously, `QualifierOrder` only supported a limited subset of C++
declaration specifiers:
- `const`, `volatile`, `static`, `inline`, `constexpr`, `restrict`,
`friend`

This meant that many common C++ qualifiers like `extern`, `mutable`,
`typedef`, `unsigned`, etc. were not recognized and could not be
properly reordered, limiting the usefulness of the feature.


    [17 lines not shown]
DeltaFile
+156-33clang/unittests/Format/QualifierFixerTest.cpp
+62-15clang/lib/Format/QualifierAlignmentFixer.cpp
+14-0clang/include/clang/Format/Format.h
+14-0clang/docs/ClangFormatStyleOptions.md
+4-0clang/docs/ReleaseNotes.md
+250-485 files

LLVM/project b04bfb5llvm/lib/Target/AMDGPU AMDGPUGlobalISelUtils.cpp

AMDGPU: Capture G_PTR_ADD flags via m_MIFlags in getBaseWithConstantOffset (#216809)

Read the nuw flag from the m_GPtrAdd match itself instead of a redundant
getVRegDef of the pointer register. NFC.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+4-2llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.cpp
+4-21 files

LLVM/project bf8c3e1llvm/lib/Target/AMDGPU AMDGPURegBankLegalize.cpp

AMDGPU: Use mi_match for G_BITCAST check in RegBankLegalize (#216808)

Replace the getVRegDef + G_BITCAST opcode check in
tryEliminateReadAnyLane
with m_GBitcast. NFC.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+2-4llvm/lib/Target/AMDGPU/AMDGPURegBankLegalize.cpp
+2-41 files

LLVM/project 1e1b092llvm/lib/Target/AArch64 AArch64InstrInfo.cpp

AArch64: Guard optimizeCondBranch against a physical copy source (#216699)

optimizeCondBranch walks COPY chains from the branch condition register,
calling getVRegDef on each copy's source operand. A COPY source can be a
physical register which doesn't make sense to pass to getVRegDef.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+2-0llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+2-01 files

LLVM/project 5a42ba2clang/lib/CodeGen CodeGenModule.cpp, clang/test/CodeGen/AArch64 abi-classify-return-types.c

[LLVMABI][AARCH64] Add support for simple direct return case (#216437)

This adds LLVM ABI library support for AArch64 return type
classification for scalar and matrix types that are classified as
Direct. Other types and all arguments are now reported as not yet
implemented.

This also introduces the hook in Clang to use the ABI library for
non-Windows AArch64 targets when `-fexperimental-abi-lowering` is passed
and adds a test for the ABI handling of types which are handled by the
library.

Assisted-by: Cursor / various models
DeltaFile
+86-34llvm/unittests/ABI/AArch64TargetInfoTest.cpp
+69-5llvm/lib/ABI/Targets/AArch64.cpp
+62-0clang/test/CodeGen/AArch64/abi-classify-return-types.c
+25-5clang/lib/CodeGen/CodeGenModule.cpp
+1-19llvm/lib/ABI/Targets/X86.cpp
+20-0llvm/lib/ABI/TargetInfo.cpp
+263-631 files not shown
+266-637 files

LLVM/project e3eee24llvm/lib/Analysis IVDescriptors.cpp

Fixups
DeltaFile
+1-1llvm/lib/Analysis/IVDescriptors.cpp
+1-11 files

LLVM/project 65f4e7ellvm/lib/Analysis IVDescriptors.cpp

Fixups
DeltaFile
+3-3llvm/lib/Analysis/IVDescriptors.cpp
+3-31 files

LLVM/project 9353eddllvm/docs LangRef.md, llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp

[APFloat][SelectionDAG] Support Float8E5M3FNU in `convert.{to,from}.arbitrary.fp` (#216387)

Float8E5M3FNU was already accepted by the IR verifier, because
`isValidArbitraryFPFormat` is defined in terms of
`getArbitraryFPFormatSizeInBits` and that table covers it. It was
missing from `getArbitraryFPSemantics`, so `SelectionDAGBuilder`
rejected it with "not implemented format" and the verifier-clean IR
failed to compile. Add the mapping and the corresponding entries in the
`expandCONVERT_{TO,FROM}_ARBITRARY_FP` format allowlists.

Unlike every other format the expansions handle so far, Float8E5M3FNU is
unsigned: it has no sign bit, so all 8 bits go to a 5-bit exponent and a
3-bit significand.

Since an unsigned format cannot represent a negative value, a negative
input now saturates to zero when the saturate flag is set, and is poison
otherwise. -0.0 is excluded from that and still converts to +0, and the
check is ordered before the NaN case so a negative NaN still produces
the NaN encoding. APFloat treats constructing a negative value in an

    [4 lines not shown]
DeltaFile
+263-0llvm/test/CodeGen/AMDGPU/float-to-arbitrary-fp-e5m3fnu.ll
+189-0llvm/test/CodeGen/X86/float-to-arbitrary-fp.ll
+34-11llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+7-2llvm/docs/LangRef.md
+2-2llvm/lib/Support/APFloat.cpp
+2-1llvm/unittests/ADT/APFloatTest.cpp
+497-166 files

LLVM/project 74e56f4llvm/lib/Analysis IVDescriptors.cpp

Fixups
DeltaFile
+8-12llvm/lib/Analysis/IVDescriptors.cpp
+8-121 files

LLVM/project f53b4d1llvm/lib/Target/AArch64 AArch64Subtarget.h AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 fpimm-legal-expand-optsize.ll fpimm-legal-expand-fuse-literals.ll

[AArch64] Restrict FP imm ISel by accurate subtarget macro-fusion (#214849)

This patch improves the accuracy of FP immediate lowering for runtime
performance builds. Until now we relaxed the instruction count limit
from 2 to 4 merely based on the satisfaction of `ST.hasFuseLiterals`,
but this could be wrong for example false-positive for `MOVN`
instructions which would relax the limit but are not macro fused. Here
we check exactly if immediate materialization parts can be macro fused
using a new subtarget helper which is shared with macro-fusion.

It adds exhaustive test cases for all code sequences that
`isFPImmLegal()` can enable using `expandMOVImm()`. Including f32 as
regression tests - those cannot trigger a subtarget feature check,
because a f32 immed can always be materialized by up to 2 instructions
which is the default limit. As well as an optsize test with
representative test cases.

---------

Co-authored-by: Jon Roelofs <jroelofs at gmail.com>
DeltaFile
+589-0llvm/test/CodeGen/AArch64/fpimm-legal-expand-fuse-literals.ll
+117-0llvm/test/CodeGen/AArch64/fpimm-legal-expand-optsize.ll
+47-0llvm/lib/Target/AArch64/AArch64Subtarget.cpp
+1-28llvm/lib/Target/AArch64/AArch64MacroFusion.cpp
+21-3llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+11-0llvm/lib/Target/AArch64/AArch64Subtarget.h
+786-316 files

LLVM/project 52af9daoffload/languages/include/kernel LanguageRuntime.h, offload/languages/kernel/src LanguageRuntime.cpp

add Memset
DeltaFile
+87-0offload/test/offloading/CUDA/memset.cu
+85-0offload/test/offloading/HIP/memset.hip
+19-0offload/languages/kernel/src/LanguageRuntime.cpp
+1-2offload/test/offloading/HIP/basic_launch_blocks_and_threads.hip
+1-2offload/test/offloading/CUDA/basic_launch_blocks_and_threads.cu
+2-0offload/languages/include/kernel/LanguageRuntime.h
+195-42 files not shown
+197-48 files

LLVM/project 53356c9llvm/lib/Target/RISCV RISCVInstrInfoXqci.td

[RISCV] Use PatLeaf to reduce Xqcibi select and SFB patterns. NFC (#216451)

Assisted-by: Claude
DeltaFile
+34-26llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td
+34-261 files

LLVM/project 924c2c5offload/languages/kernel/src LanguageRuntime.cpp, offload/test/offloading/CUDA devicesync_streams.cu

add proper deviceSync
DeltaFile
+98-0offload/test/offloading/CUDA/devicesync_streams.cu
+97-0offload/test/offloading/HIP/devicesync_streams.hip
+13-6offload/languages/kernel/src/LanguageRuntime.cpp
+1-1offload/test/offloading/HIP/launch_tu.hip
+1-1offload/test/offloading/HIP/basic_launch_multi_arg.hip
+1-1offload/test/offloading/HIP/basic_launch_blocks_and_threads.hip
+211-97 files not shown
+218-1213 files

NetBSD/pkgsrc 1lY0Ca3devel/glasgow distinfo Makefile

   Update devel/glasgow to newer Git snapshot
VersionDeltaFile
1.2+369-122devel/glasgow/PLIST
1.6+9-7devel/glasgow/Makefile
1.2+4-4devel/glasgow/distinfo
+382-1333 files

NetBSD/pkgsrc 26VI373devel/py-fx2 distinfo PLIST

   Update devel/py-fx2 to 0.16
VersionDeltaFile
1.6+5-7devel/py-fx2/Makefile
1.2+5-5devel/py-fx2/PLIST
1.3+4-4devel/py-fx2/distinfo
+14-163 files

LLVM/project eddfe45llvm/lib/Target/AArch64 AArch64InstrInfo.cpp, llvm/test/CodeGen/AArch64 early-ifcvt-same-value.mir

AArch64: Fix csel-fold crash on an undef register (#216720)
DeltaFile
+40-0llvm/test/CodeGen/AArch64/early-ifcvt-same-value.mir
+3-1llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+43-12 files

LLVM/project c130f0allvm/lib/Target/AMDGPU SIInstrInfo.td, llvm/lib/Target/AMDGPU/Disassembler AMDGPUDisassembler.cpp

[AMDGPU][MC] Fix a crash when invalid SDWA encoding is used (#215140)

Fixes #215006.
DeltaFile
+16-0llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+14-0llvm/test/MC/Disassembler/AMDGPU/gfx9_dasm_err.txt
+4-1llvm/lib/Target/AMDGPU/SIInstrInfo.td
+34-13 files

OpenBSD/src nbAl72Rusr.bin/tmux client.c

   Log unknown message types.
VersionDeltaFile
1.168+7-1usr.bin/tmux/client.c
+7-11 files

LLVM/project 448cff5clang/lib/Sema SemaLifetimeSafety.h, clang/test/Sema/LifetimeSafety annotation-suggestions.cpp

macro-suggest
DeltaFile
+15-0clang/test/Sema/LifetimeSafety/annotation-suggestions.cpp
+8-2clang/lib/Sema/SemaLifetimeSafety.h
+23-22 files

FreeBSD/src 9b8c2bflib/libc/gen fts.c, lib/libc/tests/gen fts_misc_test.c

fts: fix file descriptor leak in fts_close

fts_build() stores a dup'd file descriptor in each directory
entry's fts_dirfd.  When a traversal is abandoned before
completion and fts_close() is called, the cleanup loop freed
each pending entry with free() without first closing its
fts_dirfd, leaking one descriptor per pending directory.

Close fts_dirfd before freeing each entry in the cleanup loop,
matching the handling already applied to the dummy parent entry
after the loop.

Add a regression test that descends a couple of levels, abandons
the traversal, closes, and asserts the open descriptor count is
unchanged.

PR:             297557
Reported by:    asomers
Fixes:          4bd01d6ae016

    [3 lines not shown]
DeltaFile
+66-0lib/libc/tests/gen/fts_misc_test.c
+2-0lib/libc/gen/fts.c
+68-02 files

LLVM/project 9a1c6e5clang/lib/CIR/Lowering LoweringHelpers.cpp, clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp

[CIR] Fix array consts who change during layout (#216732)

The element types of an array can change for the purposes of lowering
depending on the contents of the initializer, particularly with unions.
This patch correctly mutates the array type such that it is either a
contiguous array (the correct way), or a struct that has the same
layout.
DeltaFile
+84-0clang/test/CIR/CodeGen/union-init-padding-array.c
+52-1clang/lib/CIR/Lowering/LoweringHelpers.cpp
+5-6clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+141-73 files

OpenBSD/src AWMrcrxusr.bin/tmux tmux.h input.c

   Flush output before ending sync. GitHub issue 5495 from xiangzhedev at
   gmail dot com.
VersionDeltaFile
1.287+14-1usr.bin/tmux/screen-write.c
1.270+2-2usr.bin/tmux/input.c
1.1425+2-1usr.bin/tmux/tmux.h
+18-43 files

NetBSD/src 9Th06z0sys/dev/pci pcidevs_data.h pcidevs.h

   regen.
VersionDeltaFile
1.1522+2-2sys/dev/pci/pcidevs_data.h
1.1523+2-2sys/dev/pci/pcidevs.h
+4-42 files

NetBSD/src i0wQhUhsys/dev/pci pcidevs

   fix typo in my previous commit: s/JMC58X/JMB58x/.
VersionDeltaFile
1.1544+2-2sys/dev/pci/pcidevs
+2-21 files

LLVM/project 74bb5a3llvm/lib/Transforms/Vectorize VPlanTransforms.h, llvm/test/Transforms/LoopVectorize vplan-print-before-after.ll

[VPlan][UTC] Number VPlan passes' instances in printing/filtering (#211424)

Allows to use UTC-generated CHECKs in more tests. First instance of a
given VPlan pass on a function doesn't have a number (would need
`-vplan-print-after=passName$`). Subsequent instances are numbered and
can be filtered as `-vplan-print-after=passName at 2`.
DeltaFile
+174-182llvm/test/Transforms/LoopVectorize/VPlan/AArch64/vplan-printing.ll
+67-62llvm/test/Transforms/LoopVectorize/VPlan/PowerPC/vplan-force-tail-with-evl.ll
+59-14llvm/test/Transforms/LoopVectorize/VPlan/constant-fold.ll
+21-6llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+14-9llvm/test/Transforms/LoopVectorize/VPlan/vplan-print-before-after-all.ll
+6-0llvm/test/Transforms/LoopVectorize/vplan-print-before-after.ll
+341-2736 files

LLVM/project c86596fllvm/lib/Target/AMDGPU AMDGPUCombinerHelper.cpp

AMDGPU: Use mi_match in isFPExtFromF16OrConst (#216807)

Replace the getVRegDef + G_FPEXT/G_FCONSTANT opcode checks with m_GFPExt
and m_GFCst matchers. NFC.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+5-6llvm/lib/Target/AMDGPU/AMDGPUCombinerHelper.cpp
+5-61 files

LLVM/project aa7316dllvm/test/Transforms/PGOProfile memprof_internal_linkage.ll, llvm/test/Transforms/PGOProfile/Inputs memprof_internal_linkage.memprofraw memprof_internal_linkage.exe

[NFC][MemProf] Replace MemProf binary with YAML (#216796)

Use `split-file` to inline the YAML into the test. Depends on
https://github.com/llvm/llvm-project/pull/216778.
DeltaFile
+24-10llvm/test/Transforms/PGOProfile/memprof_internal_linkage.ll
+0-18llvm/test/Transforms/PGOProfile/Inputs/update_memprof_inputs.sh
+0-0llvm/test/Transforms/PGOProfile/Inputs/memprof_internal_linkage.memprofraw
+0-0llvm/test/Transforms/PGOProfile/Inputs/memprof_internal_linkage.exe
+24-284 files

LLVM/project 38517d9mlir/include/mlir/Dialect/SCF/TransformOps SCFTransformOps.td, mlir/lib/Dialect/SCF/TransformOps SCFTransformOps.cpp

[mlir][scf] Fully unroll SCF/Affine loops (#215220)

Adds a new transform op that fully unrolls given loops. Also, updates
'loop.unroll' documentation to better reflect its functionality.

A new op is added to avoid overloading and changing the default behavior
of the other existing unroll ops.
On its own, the new op complements the existing two transform ops and
mirrors available SCF/Affine utils.

Assisted-by: Copilot
DeltaFile
+71-2mlir/test/python/integration/dialects/transform.py
+49-0mlir/test/Dialect/SCF/transform-ops.mlir
+33-2mlir/include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td
+23-0mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp
+21-0mlir/test/Dialect/SCF/transform-ops-invalid.mlir
+18-0mlir/python/mlir/dialects/transform/loop.py
+215-46 files

LLVM/project 80b2ef6llvm/include/llvm/MC MCSectionGOFF.h, llvm/lib/MC MCAsmInfoGOFF.cpp

[SystemZ][z/OS] Refactor switching section for HLASM

Emitting the HLASM instructions for switching section is distributed
between MCAsmInfoGOFF and SystemZHLASMAsmStreamer, with some code
duplication. This change consolidates the implementation in
SystemZHLASMAsmStreamer.
DeltaFile
+163-49llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+5-157llvm/lib/MC/MCAsmInfoGOFF.cpp
+3-1llvm/include/llvm/MC/MCSectionGOFF.h
+171-2073 files

LLVM/project 298ee5bllvm/lib/Target/AMDGPU AMDGPURewriteAGPRCopyMFMA.cpp, llvm/test/CodeGen/AMDGPU rewrite-vgpr-mfma-to-agpr-spill-joint-dom.ll rewrite-vgpr-mfma-to-agpr-spill-joint-dom-mir.mir

[1/2][AMDGPU] Fixed crash due to virtual register defs not dominating uses (#198472)

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

Fixes duplicate ROCM-24494, LCOMPILER-2224.

In Rewrite AGPR-Copy-MFMA pass, a spill reload may not have a dominating
spill store. If such a slot is unspilled into a vreg, the elimination
phase crashes because virtual register defs do not dominate all uses.
This patch checks for that dominance property for all reloads and skips
unspilling if such a condition is found.

This patch is adapted from 
https://github.com/llvm/llvm-project/pull/167347

Cherry-picked https://github.com/ROCm/llvm-project/commit/e5d02ddb
Authored by: Austin Kerbow <Austin.Kerbow at amd.com>

Instead of scanning through instructions within the reload basic block,

    [17 lines not shown]
DeltaFile
+1,770-0llvm/test/CodeGen/AMDGPU/rewrite-vgpr-mfma-to-agpr-spill-joint-dom-mir.mir
+159-0llvm/test/CodeGen/AMDGPU/rewrite-vgpr-mfma-to-agpr-spill-joint-dom.ll
+84-4llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
+2,013-43 files