LLVM/project ccf1638llvm/include/llvm/CodeGenTypes LowLevelType.h, llvm/lib/CodeGenTypes LowLevelType.cpp

[CodeGenTypes] Make LLT::ExtendedLLT atomic (#219546)
DeltaFile
+13-3llvm/include/llvm/CodeGenTypes/LowLevelType.h
+2-2llvm/lib/CodeGenTypes/LowLevelType.cpp
+15-52 files

LLVM/project fd399c1llvm/lib/Target/AMDGPU SIInstrInfo.cpp, llvm/test/CodeGen/AMDGPU lower-work-group-id-intrinsics.ll llvm.amdgcn.image.dim.gfx90a.ll

[AMDGPU] Extend wide VGPR copy expansion to 96-bit copies (#214561)

Extend physical VGPR copy expansion to handle 96-bit copies using one
64-bit move and one 32-bit move when `V_MOV_B64_e32` is available.

The move order accounts for overlapping source and destination
registers. SGPR-to-VGPR copies are also supported, matching the existing
support for copies whose sizes are multiples of 64 bits.

The first commit precommits regression coverage for non-overlapping,
forward-overlapping, and backward-overlapping copies.
DeltaFile
+874-0llvm/test/CodeGen/AMDGPU/copy_phys_vgpr.mir
+0-784llvm/test/CodeGen/AMDGPU/copy_phys_vgpr64.mir
+45-27llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+16-16llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scale.pk.ll
+6-12llvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.dim.gfx90a.ll
+3-3llvm/test/CodeGen/AMDGPU/lower-work-group-id-intrinsics.ll
+944-8423 files not shown
+949-8489 files

LLVM/project 56eec16llvm/lib/Target/X86 X86LowerTileCopy.cpp, llvm/test/CodeGen/X86/ACE acev1-outer-product.ll ace-intrinsics.ll

Address review comments

- Rename the ACE tests and directories to acev1 for consistency
- Build acev1 on top of avx10.1 rather than avx10.2
- Fix test encodings and the BSR0 implicit defs
- Make the scale register type consistent with the spec
- Add memory operand tests for bsrmov
- Confirm the ACEV1 ISA implication chain
- Take the outer product ZMM sources by value instead of by register ID,
  so they are allocated conventionally, and mark the 512-bit ACE builtins
  with RequiredVectorWidth<512>
- Use pseudos for SPILL and RELOAD. Spills use scratch zmm. Don't use
  non-ace ISA.
- Fix missing vector r/m in MRMSrcReg4VOp3.
DeltaFile
+357-0llvm/test/CodeGen/X86/ACEV1/acev1-intrinsics.ll
+262-0llvm/test/MC/Disassembler/X86/acev1.txt
+0-244llvm/test/CodeGen/X86/ACE/ace-intrinsics.ll
+206-0llvm/test/CodeGen/X86/ACEV1/acev1-outer-product.ll
+0-204llvm/test/CodeGen/X86/ACE/acev1-outer-product.ll
+100-76llvm/lib/Target/X86/X86LowerTileCopy.cpp
+925-52439 files not shown
+2,173-1,67945 files

LLVM/project 338e0c9llvm/lib/Target/DirectX/DXILWriter DXILDebugInfoMap.h DXILDebugInfoMap.cpp, llvm/lib/Target/DirectX/DirectXIRPasses DXILDebugInfo.h DXILDebugInfo.cpp

[DirectX] Refactor DXILDebugInfo into a pass (#220989)

resolves #220323

DXILDebugInfo was structured as a namespace
with its pass chained to run as part of either
the DXILBitcodeWriter or DXILPrettyPrinter passes.

This is wrong and led to us failing expensive checks because
DXILDebugInfo changes IR but the writers are not expected to do so.

The fix was two fold, move the DXILDebugInfo into a pass. Second,

Refactor all the module debug info reader\writer code out of
DXILDebugInfo and into DXILDebugInfoMap which is used by both the
PrettyPrinter and the BitCodeWriter and move that code into the
DXILWriter compilation module since it is only used by the writers.
DeltaFile
+36-171llvm/lib/Target/DirectX/DirectXIRPasses/DXILDebugInfo.cpp
+175-0llvm/lib/Target/DirectX/DXILWriter/DXILDebugInfoMap.cpp
+71-0llvm/lib/Target/DirectX/DXILWriter/DXILDebugInfoMap.h
+5-57llvm/lib/Target/DirectX/DirectXIRPasses/DXILDebugInfo.h
+19-19llvm/test/CodeGen/DirectX/DebugInfo/di-subprogram.ll
+15-11llvm/test/CodeGen/DirectX/DebugInfo/di-commonblock.ll
+321-25820 files not shown
+401-31626 files

LLVM/project 9306a82llvm/lib/Target/DirectX DXILLegalizePass.cpp, llvm/lib/Transforms/Scalar Scalarizer.cpp

[Scalarizer][DirectX] Teach the Scalarizer to handle integer bitcasts between scalars and vectors. (#221033)

Fixes #219327

For vector-to-scalar bitcasts, combine the scalarized vector elements
using
extensions, shifts, and ORs. This avoids reconstructing an illegal
vector before
bitcasting it to a scalar. In particular, this fixes the `<2 x i16> ->
i32`
bitcast generated while lowering 16-bit vector `countbits`.

Also move the existing `i64 -> <2 x i32>` legalization from the DirectX
legalizer into the generic Scalarizer. The Scalarizer now splits these
values
using shifts and truncations while respecting target endianness.

With both bitcast directions handled by the Scalarizer, remove
`legalizeGetHighLowi64Bytes` from the DirectX legalizer and move

    [5 lines not shown]
DeltaFile
+1-58llvm/lib/Target/DirectX/DXILLegalizePass.cpp
+40-0llvm/lib/Transforms/Scalar/Scalarizer.cpp
+32-0llvm/test/Transforms/Scalarizer/bitcast-vector-to-scalar.ll
+28-0llvm/test/Transforms/Scalarizer/bitcast-scalar-to-vector.ll
+0-18llvm/test/CodeGen/DirectX/legalize-i64-high-low-vec-split.ll
+16-0llvm/test/CodeGen/DirectX/countbits.ll
+117-766 files

LLVM/project 5eef528llvm/lib/Target/AMDGPU AMDGPUAsmPrinter.cpp, llvm/test/CodeGen/AMDGPU codegen-no-subarch-warn.ll

AMDGPU: Warn if trying to codegen without a subarch (#220245)

Warn if using the legacy amdgcn name, or amdgpu without a
specified subarch. This is to push all the non-clang frontends
to update to the new system, but this should turn into an error
in the next release.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+20-1llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+16-0llvm/test/CodeGen/AMDGPU/codegen-no-subarch-warn.ll
+36-12 files

LLVM/project 1b14859clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp

[CIR][NFC] Use declarative llvmOp lowering for coroutine intrinsics (#221343)

This PR switches the coroutine intrinsic ops (`cir.coro.intrinsic.id`,
`.alloc`, `.begin`, `.end`, `.free`, `.size`) to use the declarative
`llvmOp` field instead of hand-written lowering patterns.
DeltaFile
+0-52clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+6-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+6-522 files

LLVM/project c6a0abellvm/include/llvm/CodeGen MIRYamlMapping.h, llvm/lib/CodeGen/MIRParser MIRParser.cpp

Merge branch 'users/mssefat/anti-hints-pr3-amdgpu-apply' into users/mssefat/anti-hints-pr4-amdgpu-pre-ra
DeltaFile
+2-1llvm/include/llvm/CodeGen/MIRYamlMapping.h
+1-1llvm/lib/CodeGen/MIRParser/MIRParser.cpp
+3-22 files

LLVM/project a30909bllvm/include/llvm/CodeGen MIRYamlMapping.h, llvm/lib/CodeGen/MIRParser MIRParser.cpp

Merge branch 'users/mssefat/anti-hints-pr2-mir-serialize' into users/mssefat/anti-hints-pr3-amdgpu-apply
DeltaFile
+2-1llvm/include/llvm/CodeGen/MIRYamlMapping.h
+1-1llvm/lib/CodeGen/MIRParser/MIRParser.cpp
+3-22 files

LLVM/project e1474e5clang-tools-extra/clangd/unittests ParsedASTTests.cpp XRefsTests.cpp, clang-tools-extra/unittests/clang-tidy ClangTidyOptionsTest.cpp

[clang-tools-extra][NFC] Fix -Wunused-template violations (#221427)

These cause build errors in
https://github.com/llvm/llvm-project/actions/runs/33952646467/job/101270176288.
DeltaFile
+0-13clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
+0-9clang-tools-extra/clangd/unittests/ClangdLSPServerTests.cpp
+0-4clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp
+0-4clang-tools-extra/clangd/unittests/PreambleTests.cpp
+0-3clang-tools-extra/clangd/unittests/XRefsTests.cpp
+0-2clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
+0-352 files not shown
+0-378 files

LLVM/project 99f6c74llvm/include/llvm/CodeGen MIRYamlMapping.h, llvm/lib/CodeGen/MIRParser MIRParser.cpp

Addressed review
DeltaFile
+2-1llvm/include/llvm/CodeGen/MIRYamlMapping.h
+1-1llvm/lib/CodeGen/MIRParser/MIRParser.cpp
+3-22 files

LLVM/project 698428ellvm/include/llvm/Analysis DOTGraphTraitsPass.h

[Analysis] Remove dead WriteDOTGraphToFile (NFC) (#221413)

The last callers were migrated to DOTGraphTraitsPrinter on May 16, 2022
in commit 7dce9eb6e507d48d0b79bfb408592936d378cc28.

Assisted-by: Antigravity
DeltaFile
+0-21llvm/include/llvm/Analysis/DOTGraphTraitsPass.h
+0-211 files

LLVM/project 0664fb1llvm/lib/CodeGen RegAllocPBQP.cpp, llvm/lib/Target/AMDGPU AMDGPURewriteAGPRCopyMFMA.cpp

[CodeGen] Use RegisterClassInfo for remaining allocation-order users (#216510)

Greedy already uses RegisterClassInfo for the function-specific
allocation order (reserved registers filtered, CSRs deferred). Remaining
users still walked TRI's raw order or rebuilt RCI themselves.

Uses RCI.getOrder() everywhere that list is needed (PBQP, Hexagon
spill-slot search*, ARM load/store opt, AMDGPU AGPR-copy MFMA rewrite).
Takes the shared analysis when the pass can preserve it; otherwise keep
a
local RCI after freezeReservedRegs().

Hexagon findPhysReg no longer considers reserved registers.

**Note:** Initially had register scavenger use RCI.getOrder() for
function specific scratch reg allocation, but due to test failures and
the extra loops needed as fallbacks to fix this, this change ends up
likely being outside the scope of this PR so I removed it.

**Another note:** \*Hexagon changes removed from this PR, split into
#216752
DeltaFile
+20-23llvm/lib/CodeGen/RegAllocPBQP.cpp
+19-16llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
+10-8llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
+49-473 files

LLVM/project 29fda2cllvm/lib/Target/ARM ARMInstrInfo.td ARMInstrNEON.td, llvm/test/CodeGen/ARM fp16-fusedMAC.ll fusedMAC.ll

ARM: Form fused VFMA/VFMS from the contract flag (#221340)

Select the fused VFMA/VFMS/VFNMA/VFNMS from the per-node contract
fast-math flag instead of the global AllowFPOpFusion == Fast. This is one of the
few remaining consumers of the TargetOption field.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+132-30llvm/test/CodeGen/ARM/cortex-a57-misched-vfma.ll
+107-28llvm/test/CodeGen/ARM/fusedMAC.ll
+22-26llvm/test/CodeGen/ARM/fp16-fusedMAC.ll
+22-22llvm/lib/Target/ARM/ARMInstrVFP.td
+13-11llvm/lib/Target/ARM/ARMInstrNEON.td
+19-0llvm/lib/Target/ARM/ARMInstrInfo.td
+315-1171 files not shown
+317-1237 files

LLVM/project 3dfe0cbclang/test/CIR/CodeGenHIP amdgcnspirv-kernel.hip

fix: Check HIP SPIR-V version metadata after lowering
DeltaFile
+3-0clang/test/CIR/CodeGenHIP/amdgcnspirv-kernel.hip
+3-01 files

LLVM/project a484075clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVMOpenCLMetadata.h LowerToLLVM.cpp, clang/test/CIR/CodeGenOpenCL version.cl

[CIR][OpenCL] Lower OpenCL language version metadata to LLVM dialect

Propagate CIR OpenCL language version module attributes as LLVM dialect named metadata before LLVM IR translation.

Assisted-by: Codex / GPT-5.6 Sol
DeltaFile
+43-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVMOpenCLMetadata.cpp
+16-0clang/test/CIR/CodeGenOpenCL/version.cl
+16-0clang/test/CIR/Lowering/opencl-version-metadata.cir
+2-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVMOpenCLMetadata.h
+2-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+79-05 files

LLVM/project 495a2e4clang/lib/CIR/CodeGen CIRGenModule.cpp, clang/lib/CodeGen CodeGenModule.cpp

fix: Supply the HIP SPIR-V version only for metadata emission

Fix the assertion exposed by PR #214246 under the version invariant from PR #219687. Supply OpenCL 2.0 in classic CodeGen and CIRGen without changing HIP language options or enabling OpenCL-only Sema restrictions.

Assisted-by: Codex / GPT-6
DeltaFile
+8-0clang/test/CodeGenHIP/hipspv-kernel.cpp
+8-0clang/test/SemaHIP/atomic-init.hip
+4-2clang/lib/CIR/CodeGen/CIRGenModule.cpp
+3-1clang/lib/CodeGen/CodeGenModule.cpp
+2-0clang/test/CIR/CodeGenHIP/amdgcnspirv-kernel.hip
+25-35 files

LLVM/project 8d6baedclang/lib/CIR/CodeGen CIRGenModule.h CIRGenModule.cpp, clang/test/CIR/CodeGenOpenCL version.cl

[CIR][OpenCL] Emit OpenCL language version metadata in CIR

Emit OpenCL and C++ for OpenCL language version attributes from CIRGen. Preserve the compatible OpenCL version and the C++ for OpenCL version separately so later lowering does not infer one from the other.

Assisted-by: Codex / GPT-5.6 Sol
DeltaFile
+15-0clang/test/CIR/CodeGenOpenCL/version.cl
+13-0clang/lib/CIR/CodeGen/CIRGenModule.cpp
+4-0clang/test/CodeGenCUDASPIRV/kernel-cc.cu
+1-0clang/lib/CIR/CodeGen/CIRGenModule.h
+33-04 files

LLVM/project fa0a4e1clang/lib/CIR/Dialect/IR CIRDialect.cpp

fix: separate CIR attribute dispatch from OpenCL verification
DeltaFile
+20-8clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+20-81 files

LLVM/project b8a76acclang/include/clang/CIR/Dialect/IR CIRDialect.td CIROpenCLAttrs.td, clang/lib/CIR/Dialect/IR CIROpenCLAttrs.cpp CIRDialect.cpp

[CIR][OpenCL] Add OpenCL language version module attributes

Add structured CIR module attributes for OpenCL and C++ for OpenCL language versions. Verify their module-level placement and version components so lowering can consume explicit source-language version state.

Assisted-by: Codex / GPT-5.6 Sol
DeltaFile
+76-0clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+73-0clang/test/CIR/IR/invalid-version.cir
+28-0clang/include/clang/CIR/Dialect/IR/CIROpenCLAttrs.td
+19-0clang/test/CIR/IR/version.cir
+15-0clang/lib/CIR/Dialect/IR/CIROpenCLAttrs.cpp
+5-0clang/include/clang/CIR/Dialect/IR/CIRDialect.td
+216-01 files not shown
+219-17 files

LLVM/project 446d026clang/lib/CodeGen BackendUtil.cpp, llvm/include/llvm/MC MCTargetOptions.h

MC: Move BinutilsVersion from TargetOptions to MCTargetOptions

BinutilsVersion has no codegen use and only used by MCAsmInfo to check
ELF assembler features.

Co-authored-by: Claude (claude-opus-4.8) <noreply at anthropic.com>
DeltaFile
+10-0llvm/lib/MC/MCTargetOptions.cpp
+0-9llvm/lib/Target/TargetMachine.cpp
+8-0llvm/include/llvm/MC/MCTargetOptions.h
+3-2clang/lib/CodeGen/BackendUtil.cpp
+0-4llvm/include/llvm/Target/TargetOptions.h
+2-2llvm/tools/llc/llc.cpp
+23-173 files not shown
+25-229 files

LLVM/project 0c94a97libcxx/include/__concepts common_with.h

[libc++][NFC] Avoid empty namespace in `<__concepts/common_with.h>` (#221407)

...in pre-C++20 modes. This fixes complaining from clang-tidy checks in
CI.
DeltaFile
+4-4libcxx/include/__concepts/common_with.h
+4-41 files

LLVM/project d74068dllvm/lib/Transforms/IPO OpenMPOpt.cpp, llvm/test/Transforms/OpenMP callback_parallel_regions.ll spmdization_no_guarding_two_reaching_kernels.ll

[OpenMPOpt] Ask the runtime how many of a block's threads can be workers

The custom state machine gates a thread on InitCB < BlockHwSize - WarpSize,
reconstructing the number of worker threads from the block size on the
assumption that the main thread occupies a whole warp above them. The DeviceRTL
already computes that number, in mapping::getMaxTeamThreads(), and its own
generic state machine gates on it in shouldEnterStateMachine(). Export it as
__kmpc_get_max_team_threads() and call that instead, so the compiler's state
machine and the runtime's agree by construction rather than by arithmetic that
has to be kept in step with the launch geometry.

This is NFC here: getMaxTeamThreads() in generic mode is BlockSize - WarpSize,
the same three instructions folded into one call. It is not NFC for a toolchain
whose launch geometry differs. In ROCm, CGOpenMPRuntimeGPU starts a single extra
thread rather than a warp -- "Only one additional thread is started, not an
entire warp" -- so thread_limit(1024) on a 64-lane target launches 961 threads
and the runtime reports 960 workers, while the state machine's own arithmetic
says 961 - 64 = 897. The threads in between are in neither group: the state
machine returns immediately for them, and the parallel region still hands them

    [12 lines not shown]
DeltaFile
+32-64llvm/test/Transforms/OpenMP/spmdization.ll
+24-48llvm/test/Transforms/OpenMP/custom_state_machines.ll
+22-30llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+8-16llvm/test/Transforms/OpenMP/spmdization_indirect.ll
+6-12llvm/test/Transforms/OpenMP/spmdization_no_guarding_two_reaching_kernels.ll
+4-8llvm/test/Transforms/OpenMP/callback_parallel_regions.ll
+96-1784 files not shown
+113-18310 files

LLVM/project ec06ae2llvm/include/llvm/Frontend/OpenMP OMPKinds.def, llvm/lib/Transforms/IPO OpenMPOpt.cpp

[OpenMPOpt] Look inside the callbacks the loop runtime functions are handed

The __kmpc_{distribute_,for_,distribute_for_}static_loop_* functions receive the
loop body as a callback, so a parallel region written inside that body is
reachable from the kernel through the runtime call. AAKernelInfo could not see
that, and recorded the call as reaching an unknown parallel region. A kernel
using these functions therefore always got a worker state machine whose only
option was to indirectly call whatever work function it was handed.

Describe the callback argument of each of these functions in OMPKinds.def and
attach the corresponding !callback metadata in OpenMPOpt, then fold the
callback's AAKernelInfo state into the caller's. The state machine can now
dispatch directly to the regions the loop body actually reaches. Relax the two
"more than one callee means give up" checks for functions carrying !callback,
since the callback edge is a second edge by construction and is analyzable.

The conservative unknown-region record is kept for the case that motivated it, a
callback we only see a declaration of.


    [39 lines not shown]
DeltaFile
+239-0llvm/test/Transforms/OpenMP/callback_parallel_regions.ll
+99-10llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+51-0llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
+48-0offload/test/offloading/fortran/target-teams-distribute-nested-parallel-do.f90
+437-104 files

LLVM/project b59cce1clang-tools-extra/docs/clang-tidy/checks/readability container-size-empty.md duplicate-include.md

[clang-tidy][docs] Rewrite readability check docs to Markdown [1/5]
DeltaFile
+82-85clang-tools-extra/docs/clang-tidy/checks/readability/enum-initial-value.md
+62-67clang-tools-extra/docs/clang-tidy/checks/readability/else-after-return.md
+41-39clang-tools-extra/docs/clang-tidy/checks/readability/ambiguous-smartptr-reset-call.md
+31-33clang-tools-extra/docs/clang-tidy/checks/readability/avoid-return-with-void-value.md
+28-29clang-tools-extra/docs/clang-tidy/checks/readability/duplicate-include.md
+25-27clang-tools-extra/docs/clang-tidy/checks/readability/container-size-empty.md
+269-2804 files not shown
+351-36710 files

LLVM/project 4a3ad32clang-tools-extra/docs/clang-tidy/checks/readability ambiguous-smartptr-reset-call.rst ambiguous-smartptr-reset-call.md

[clang-tidy][docs] Rename readability check docs to Markdown [1/5]
DeltaFile
+0-111clang-tools-extra/docs/clang-tidy/checks/readability/enum-initial-value.rst
+111-0clang-tools-extra/docs/clang-tidy/checks/readability/enum-initial-value.md
+0-90clang-tools-extra/docs/clang-tidy/checks/readability/else-after-return.rst
+90-0clang-tools-extra/docs/clang-tidy/checks/readability/else-after-return.md
+0-62clang-tools-extra/docs/clang-tidy/checks/readability/ambiguous-smartptr-reset-call.rst
+62-0clang-tools-extra/docs/clang-tidy/checks/readability/ambiguous-smartptr-reset-call.md
+263-26314 files not shown
+534-53420 files

LLVM/project 6143832clang/include/clang/Basic CodeGenOptions.h, llvm/include/llvm/Support CodeGen.h

WebAssembly: Introduce ExceptionHandling::EmscriptenEH model

Add a dedicated EmscriptenEH exception model so the control uses
the standard exception model control, instead of relying on a backend
specific cl::opt. This will later migrate to a module flag and
remove -enable-emscripten-cxx-exceptions

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+20-12llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+11-6llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+8-7llvm/include/llvm/Support/CodeGen.h
+5-8llvm/test/CodeGen/WebAssembly/eh-option-errors.ll
+12-1clang/include/clang/Basic/CodeGenOptions.h
+6-3llvm/lib/Target/WebAssembly/WebAssemblyCodeGenPassBuilder.cpp
+62-3714 files not shown
+94-5320 files

LLVM/project a22a048llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/test/CodeGen/ARM cortex-a57-misched-vfma.ll

DAGCombiner: Drop AllowFPOpFusion from visitFSUBForFMACombine

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+203-31llvm/test/CodeGen/ARM/cortex-a57-misched-vfma.ll
+3-3llvm/test/CodeGen/Hexagon/sffms.ll
+3-3llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+209-373 files

LLVM/project 6d139a6llvm/lib/Target/LoongArch LoongArchMergeBaseOffset.cpp, llvm/lib/Target/RISCV RISCVMergeBaseOffset.cpp

[LoongArch][RISCV] Ignore debug uses when merging base offsets (#221117)

## Summary

Debug instructions are currently enumerated as ordinary users by the RISC-V
and LoongArch merge-base-offset passes. A `DBG_VALUE` can therefore veto an
otherwise valid fold and make `-g` add an ordinary address-calculation
instruction.

Use the non-debug instruction iterator for validation and rewriting, and make
affected debug values unavailable before changing the address represented by
the destination register. Also handle the case where the register has no
ordinary users, which becomes possible after debug uses are excluded.

The same change is applied to both targets because their implementations and
failure mode are equivalent.

## Testing


    [6 lines not shown]
DeltaFile
+42-0llvm/test/CodeGen/LoongArch/merge-base-offset-debug-only.mir
+40-0llvm/test/CodeGen/RISCV/merge-base-offset-debug-only.mir
+37-0llvm/test/CodeGen/LoongArch/merge-base-offset-debug-use.ll
+37-0llvm/test/CodeGen/RISCV/merge-base-offset-debug-use.ll
+9-2llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp
+9-2llvm/lib/Target/LoongArch/LoongArchMergeBaseOffset.cpp
+174-46 files

LLVM/project cd9a5fellvm/test/CodeGen/AMDGPU madak.ll, llvm/test/CodeGen/LoongArch float-fma.ll double-fma.ll

DAGCombiner: Drop AllowFPOpFusion from visitFADDForFMACombine

Rewrites fp-dp3.ll to use flags on individual patterns. It weirdly
used different triples for the fp-contract on and off cases, seemingly
an artifact of the ARM64 and AArch64 merge.

fp-contract.cu is essentially a bugfix, the local fp contract(on) pragma
wins over the global flag now.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+352-1,116llvm/test/CodeGen/LoongArch/lasx/fma-v8f32.ll
+352-1,116llvm/test/CodeGen/LoongArch/lasx/fma-v4f64.ll
+260-872llvm/test/CodeGen/LoongArch/float-fma.ll
+260-872llvm/test/CodeGen/LoongArch/double-fma.ll
+388-471llvm/test/CodeGen/AMDGPU/madak.ll
+178-564llvm/test/CodeGen/LoongArch/lsx/fma-v4f32.ll
+1,790-5,01117 files not shown
+2,485-6,18223 files