LLVM/project a3d9354llvm/include/llvm/CodeGen MachineMemOperand.h, llvm/test/CodeGen/X86 branchfolding-atomic-mmo.ll

[CodeGen] Compare MMO atomic ordering and syncscope. (#199892)

MachineMemOperand::operator== compared the address, flags, AA metadata,
range, alignment, and address space, but not atomic success ordering,
failure ordering, or syncscope. Users such as
MachineInstr::cloneMergedMemRefs could therefore treat atomic and
non-atomic MMOs, or atomics with different syncscopes, as identical.

This bug was found by a large run of Opus 4.7 looking for bugs in LLVM.
DeltaFile
+42-0llvm/test/CodeGen/X86/branchfolding-atomic-mmo.ll
+4-1llvm/include/llvm/CodeGen/MachineMemOperand.h
+46-12 files

LLVM/project 0d8ba69utils/bazel MODULE.bazel.lock .bazelrc

[bazel] Add config for hermetic clang toolchain (#192528)

This config uses the https://github.com/hermeticbuild/hermetic-llvm
toolchain to avoid any dependency on the host compiler. This makes it
trivial to test with remote execution and also supports cross
compilation.
DeltaFile
+33-3utils/bazel/MODULE.bazel.lock
+22-0utils/bazel/.bazelrc
+2-0utils/bazel/MODULE.bazel
+57-33 files

LLVM/project b48d66allvm/include/llvm/CodeGen MachineFunction.h, llvm/lib/CodeGen MachineFunction.cpp

[AMDGPU][MC] Replace shifted registers in CFI instructions

Change-Id: I0d99e9fe43ec3b6fecac20531119956dca2e4e5c
DeltaFile
+67-67llvm/test/CodeGen/AMDGPU/sgpr-spill-overlap-wwm-reserve.mir
+33-0llvm/lib/MC/MCDwarf.cpp
+15-15llvm/test/CodeGen/AMDGPU/dwarf-multi-register-use-crash.ll
+10-0llvm/lib/CodeGen/MachineFunction.cpp
+4-4llvm/test/CodeGen/AMDGPU/debug-frame.ll
+4-0llvm/include/llvm/CodeGen/MachineFunction.h
+133-865 files not shown
+143-9011 files

LLVM/project 4e99a0fllvm/lib/Target/AMDGPU SIFrameLowering.cpp SIMachineFunctionInfo.h, llvm/test/CodeGen/AMDGPU amdgpu-spill-cfi-saved-regs.ll

[AMDGPU] Implement -amdgpu-spill-cfi-saved-regs

These spills need special CFI anyway, so implementing them directly
where CFI is emitted avoids the need to invent a mechanism to track them
from ISel.

Change-Id: If4f34abb3a8e0e46b859a7c74ade21eff58c4047
Co-authored-by: Scott Linder scott.linder at amd.com
Co-authored-by: Venkata Ramanaiah Nalamothu VenkataRamanaiah.Nalamothu at amd.com
DeltaFile
+2,926-0llvm/test/CodeGen/AMDGPU/amdgpu-spill-cfi-saved-regs.ll
+12-0llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+10-0llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
+9-0llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+2-0llvm/lib/Target/AMDGPU/SIRegisterInfo.h
+2,959-05 files

LLVM/project 74b5fc0llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll gfx-callable-argument-types.ll

[AMDGPU] Implement CFI for CSR spills

Introduce new SPILL pseudos to allow CFI to be generated for only CSR
spills, and to make ISA-instruction-level accurate information.

Other targets either generate slightly incorrect information or rely on
conventions for how spills are placed within the entry block. The
approach in this change produces larger unwind tables, with the
increased size being spent on additional DW_CFA_advance_location
instructions needed to describe the unwinding accurately.

Change-Id: I9b09646abd2ac4e56eddf5e9aeca1a5bebbd43dd
Co-authored-by: Scott Linder <scott.linder at amd.com>
Co-authored-by: Venkata Ramanaiah Nalamothu <VenkataRamanaiah.Nalamothu at amd.com>
DeltaFile
+3,568-2,598llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+1,912-1,913llvm/test/CodeGen/AMDGPU/gfx-callable-argument-types.ll
+2,700-12llvm/test/CodeGen/AMDGPU/accvgpr-spill-scc-clobber.mir
+631-631llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+505-510llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+394-399llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+9,710-6,063108 files not shown
+14,819-9,521114 files

LLVM/project 9df27a0llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.960bit.ll

[AMDGPU] Use register pair for PC spill

Change-Id: Ibedeef926f7ff235a06de65a83087c151f66a416
DeltaFile
+4,331-4,331llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+1,742-1,740llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+1,562-1,560llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+1,462-1,460llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+1,238-1,236llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.832bit.ll
+1,030-1,028llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.768bit.ll
+11,365-11,35589 files not shown
+18,153-18,04495 files

LLVM/project b29c1f7

[Clang] Default to async unwind tables for amdgcn

To avoid codegen changes when enabling debug-info (see
https://bugs.llvm.org/show_bug.cgi?id=37240) we want to
enable unwind tables by default.

There is some pessimization in post-prologepilog scheduling, and a
general solution to the problem of CFI_INSTRUCTION-as-scheduling-barrier
should be explored.

Change-Id: I83625875966928c7c4411cd7b95174dc58bda25a
DeltaFile
+0-00 files

LLVM/project a8f3ad8

[AMDGPU] Implement CFI for non-kernel functions

This does not implement CSR spills other than those AMDGPU handles
during PEI. The remaining spills are handled in a subsequent patch.

Change-Id: I5e3a9a62cf9189245011a82a129790d813d49373
Co-authored-by: Scott Linder <scott.linder at amd.com>
Co-authored-by: Venkata Ramanaiah Nalamothu <VenkataRamanaiah.Nalamothu at amd.com>
DeltaFile
+0-00 files

LLVM/project d85a6f0

[AMDGPU] Emit entry function Dwarf CFI

Entry functions represent the end of unwinding, as they are the
outer-most frame. This implies they can only have a meaningful
definition for the CFA, which AMDGPU defines using a memory location
description with a literal private address space address. The return
address is set to undefined as a sentinel value to signal the end of
unwinding.

Change-Id: I21580f6a24f4869ba32939c9c6332506032cc654
Co-authored-by: Scott Linder <scott.linder at amd.com>
Co-authored-by: Venkata Ramanaiah Nalamothu <VenkataRamanaiah.Nalamothu at amd.com>
DeltaFile
+0-00 files

LLVM/project e384b89

[MC][Dwarf] Add custom CFI pseudo-ops for use in AMDGPU

While these can be represented with .cfi_escape, using these pseudo-cfi
instructions makes .s/.mir files more readable, and it is necessary to
support updating registers in CFI instructions (something that the
AMDGPU backend requires).

Change-Id: I763d0cabe5990394670281d4afb5a170981e55d0
DeltaFile
+0-00 files

LLVM/project ec9a1c5

[MIR] Error on signed integer in getUnsigned

Previously we effectively took the absolute value of the APSInt, instead
diagnose the unexpected negative value.

Change-Id: I4efe961e7b29fdf1d5f97df12f8139aac12c9219
DeltaFile
+0-00 files

LLVM/project bf3622ellvm/lib/Target/LoongArch LoongArchISelLowering.cpp, llvm/test/CodeGen/LoongArch musttail-tailcc.ll

[LoongArch] Support `tail` calling convention
DeltaFile
+163-0llvm/test/CodeGen/LoongArch/musttail-tailcc.ll
+1-0llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+164-02 files

LLVM/project 3a8b5e3lldb/tools/lldb-dap OutputRedirector.cpp OutputRedirector.h

[lldb-dap] Use MainLoop instead of a background thread in OutputRedirector. (#199970)

Replace the background thread in OutputRedirector with LLDB's MainLoop
event loop. This reduces the number of threads created and ensures file
descriptors are properly closed when no longer needed.

Since debugger's output is not I/O intensive, there is no risk of
hitting the pipe buffer limit with this approach.
DeltaFile
+39-34lldb/tools/lldb-dap/OutputRedirector.cpp
+23-12lldb/tools/lldb-dap/OutputRedirector.h
+14-11lldb/tools/lldb-dap/DAP.cpp
+76-573 files

LLVM/project d627924mlir/lib/Analysis SliceAnalysis.cpp, mlir/test/Dialect/Affine slicing-utils.mlir

[mlir][SliceAnalysis] Fix visited set to avoid infinite recursion  (#200008)

Fixes #139694, which introduced use-def cycle detection during slice
analysis, but some cycles were still not detected, potentially leading
to infinite recursion.

This PR fixes the handling of the visited set, which tracks the current
DFS path during recursion. Previously, the set could fail to detect
double cycles because entries were erased even when no recursive call
was made. The insert/erase operations are now only performed when
recursion actually occurs, ensuring that cycle detection correctly
reflects the active DFS path.
DeltaFile
+23-0mlir/test/Dialect/Affine/slicing-utils.mlir
+12-8mlir/lib/Analysis/SliceAnalysis.cpp
+35-82 files

LLVM/project f8bf8afclang/lib/Headers wasm_simd128.h, cross-project-tests/intrinsic-header-tests wasm_simd128.c

[WebAssembly] Add f16x8.demote_f32x4_zero to wasm_simd128.h. (#199795)

Missing header intrinsic.
DeltaFile
+8-0clang/lib/Headers/wasm_simd128.h
+6-0cross-project-tests/intrinsic-header-tests/wasm_simd128.c
+14-02 files

LLVM/project 5dc633bllvm/lib/Target/AArch64/GISel AArch64LegalizerInfo.cpp, llvm/test/CodeGen/AArch64 fabs.ll bf16-instructions.ll

[AArch64][GlobalISel] Add BF16 fabs and fneg (#198655)

These should be very simple as they are just legal or expanded based on
whether fullfp16 is available, as the FP16 FNEG and FABS instructions can
be used equally for BF16.
DeltaFile
+42-17llvm/test/CodeGen/AArch64/fabs.ll
+35-12llvm/test/CodeGen/AArch64/bf16-instructions.ll
+21-8llvm/test/CodeGen/AArch64/bf16-v4-instructions.ll
+17-8llvm/test/CodeGen/AArch64/fneg.ll
+12-9llvm/test/CodeGen/AArch64/bf16-v8-instructions.ll
+3-2llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
+130-566 files

LLVM/project f16c0ec.github/workflows issue-release-workflow.yml

workflows/issue-release-workflow: Remove template expansion of login names (#199772)

https://github.com/llvm/llvm-project/security/code-scanning/1609
https://github.com/llvm/llvm-project/security/code-scanning/1610
DeltaFile
+2-1.github/workflows/issue-release-workflow.yml
+2-11 files

LLVM/project a8e1f5cflang-rt/cmake/modules AddFlangRTOffload.cmake, flang-rt/include/flang-rt/runtime io-stmt.h

[flang-rt][cuda] Use a thinner I/O in CUDA build (#199769)

Reduce the footprint of IO in the CUDA build. This helps including IO
when using non relocatable device code mode.
DeltaFile
+194-0flang-rt/lib/runtime/io-stmt-minimal.cpp
+36-0flang-rt/lib/runtime/io-api-common.h
+9-0flang-rt/include/flang-rt/runtime/io-stmt.h
+4-1flang-rt/lib/runtime/CMakeLists.txt
+3-0flang-rt/cmake/modules/AddFlangRTOffload.cmake
+246-15 files

LLVM/project 5b38edd.github/workflows pr-code-lint.yml

workflows/pr-code-lint: Pin container image (#199767)

https://github.com/llvm/llvm-project/security/code-scanning/1678
DeltaFile
+1-1.github/workflows/pr-code-lint.yml
+1-11 files

LLVM/project ed918c1llvm/lib/CodeGen AtomicExpandPass.cpp, llvm/test/Transforms/AtomicExpand/RISCV atomicrmw-widen-volatile.ll

[AtomicExpand] Preserve volatile in widenPartwordAtomicRMW. (#199722)

widenPartwordAtomicRMW widens a sub-word atomicrmw to the target's
minimum cmpxchg size by calling CreateAtomicRMW, which has no
IsVolatile parameter, and didn't copy isVolatile() from the original.
Every other expansion path in this file already does.  Affects targets
whose MinCmpXchgSizeInBits exceeds the value width (RISC-V without
Zabha, LoongArch base, SPARC, AMDGPU, etc.).

This bug was found by a large run of Opus 4.7 looking for bugs in LLVM.
DeltaFile
+41-0llvm/test/Transforms/AtomicExpand/RISCV/atomicrmw-widen-volatile.ll
+1-0llvm/lib/CodeGen/AtomicExpandPass.cpp
+42-02 files

LLVM/project 8275507llvm/utils profcheck-xfail.txt

[ProfCheck] Fix #199174 (#200013)

The patch added another large fp conversion test, which we currently are
missing some profile annotations for, so add it to the xfail list for
now.
DeltaFile
+1-0llvm/utils/profcheck-xfail.txt
+1-01 files

LLVM/project f6af6ce.github/workflows libclang-abi-tests.yml

workflows/libclang-abi-tests: Remove template expansion (#199792)

https://github.com/llvm/llvm-project/security/code-scanning/1627
https://github.com/llvm/llvm-project/security/code-scanning/1628
https://github.com/llvm/llvm-project/security/code-scanning/1629
https://github.com/llvm/llvm-project/security/code-scanning/1630
https://github.com/llvm/llvm-project/security/code-scanning/1631
https://github.com/llvm/llvm-project/security/code-scanning/1632
https://github.com/llvm/llvm-project/security/code-scanning/1633
https://github.com/llvm/llvm-project/security/code-scanning/1634
https://github.com/llvm/llvm-project/security/code-scanning/1635
https://github.com/llvm/llvm-project/security/code-scanning/1636
https://github.com/llvm/llvm-project/security/code-scanning/1637
https://github.com/llvm/llvm-project/security/code-scanning/1638
DeltaFile
+19-9.github/workflows/libclang-abi-tests.yml
+19-91 files

LLVM/project 9998aedllvm/test/CodeGen/RISCV/rvy rvy-invalid-operands.mir

add MIR test for RISCVInstrInfo::verifyInstruction

Created using spr 1.3.8-beta.1
DeltaFile
+34-0llvm/test/CodeGen/RISCV/rvy/rvy-invalid-operands.mir
+34-01 files

LLVM/project 7a1a542.github/workflows release-documentation.yml

workflows/release-documentation: Validate input and remove template expansion (#199760)

https://github.com/llvm/llvm-project/security/code-scanning/1715
https://github.com/llvm/llvm-project/security/code-scanning/1716
https://github.com/llvm/llvm-project/security/code-scanning/1717
https://github.com/llvm/llvm-project/security/code-scanning/1718
https://github.com/llvm/llvm-project/security/code-scanning/1719
https://github.com/llvm/llvm-project/security/code-scanning/1720
https://github.com/llvm/llvm-project/security/code-scanning/1721
https://github.com/llvm/llvm-project/security/code-scanning/1722
DeltaFile
+15-8.github/workflows/release-documentation.yml
+15-81 files

LLVM/project 077210allvm/utils/gn/secondary/compiler-rt/lib/builtins BUILD.gn, llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port commits (#200011)

0d6aac78ad96
7938535a54b5
ed11d7a52a50
DeltaFile
+1-1llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+2-0llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn
+1-0llvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn
+4-13 files

LLVM/project a1cba5aflang/include/flang/Semantics openmp-utils.h, flang/lib/Semantics check-omp-structure.cpp openmp-utils.cpp

[flang][OpenMP] Optionally get final symbol in Get(Argument|Object)Sy… (#196816)

…mbol

Originally these functions returned the ultimate symbol for the one
obtained from the argument or object. However, this may be somewhat
unintuitive/unexpected, so instead return the original symbol, and add a
flag to optionally return the ultimate one.
DeltaFile
+16-14flang/lib/Semantics/check-omp-structure.cpp
+17-7flang/lib/Semantics/openmp-utils.cpp
+4-2flang/include/flang/Semantics/openmp-utils.h
+1-1flang/lib/Semantics/check-omp-loop.cpp
+38-244 files

LLVM/project 00b1353flang/lib/Lower/OpenMP OpenMP.cpp, flang/lib/Lower/Support PrivateReductionUtils.cpp

[Flang][OpenMP] Support declare reduction without initializer (#196211)

For declare reduction without an explicit initializer clause, the init
callback now handles initialization inline rather than relying on the
_FortranAInitialize runtime call, which is available on the device
runtime but has known issues on GPU targets.

The initialization logic first checks whether an initializer clause is
present. If one is provided, it is used directly. Otherwise, for derived
types, the code checks whether the type has default component
initialization. If it does, each component is initialized inline:
components with explicit default values use those values, components
that are themselves derived types with defaults are recursively
initialized, and components without any default are zero-initialized.

Derived types with allocatable components that require runtime
initialization are guarded by a TODO.

Assisted by: Claude Opus 4.6
DeltaFile
+97-0flang/test/Lower/OpenMP/declare-reduction-no-initializer-derived.f90
+83-0flang/test/Lower/OpenMP/declare-reduction-no-initializer-intrinsic.f90
+67-15flang/lib/Lower/OpenMP/OpenMP.cpp
+73-0flang/test/Lower/OpenMP/declare-reduction-target-intrinsic.f90
+56-0flang/test/Lower/OpenMP/declare-reduction-no-initializer-target-derived.f90
+48-0flang/lib/Lower/Support/PrivateReductionUtils.cpp
+424-157 files not shown
+502-2213 files

LLVM/project 2677f6ellvm/lib/Target/RISCV RISCVInstrInfoY.td RISCVInstrInfo.cpp, llvm/lib/Target/RISCV/AsmParser RISCVAsmParser.cpp

clean up tablegen operands

Created using spr 1.3.8-beta.1
DeltaFile
+7-8llvm/lib/Target/RISCV/RISCVInstrInfoY.td
+6-0llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+3-3llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
+3-2llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
+2-2llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+21-155 files

LLVM/project d98fd41llvm/lib/CodeGen ExpandIRInsts.cpp, llvm/test/Transforms/ExpandIRInsts/X86 expand-large-fp-convert-fpto-sat-vector.ll

[ExpandIRInsts] Support llvm.fpto{u,s}i.sat (#199174)

Previously, running ExpandIRInsts on a program which needs to expand a
vector fptoui.sat would hit llvm_unreachable, because the `scalarize`
function didn't handle this intrinsic.

This bug was found by a large run of Opus 4.7 looking for bugs in LLVM.
DeltaFile
+320-0llvm/test/Transforms/ExpandIRInsts/X86/expand-large-fp-convert-fpto-sat-vector.ll
+6-1llvm/lib/CodeGen/ExpandIRInsts.cpp
+326-12 files

LLVM/project 753008dflang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP target-inreduction.f90

[flang][OpenMP] Lower target in_reduction for host fallback

Teach Flang lowering and MLIR OpenMP translation to carry
in_reduction through omp.target for the host-fallback path.

The translation looks up task reduction-private storage with
__kmpc_task_reduction_get_th_data and binds the target region's
in_reduction block argument to that private pointer, so uses inside the
region do not keep referring to the original variable.

The patch also preserves in_reduction operands in the TargetOp builder
path and ensures target in_reduction list items are mapped into the
target region when needed.

The device/offload-entry path remains diagnosed as not yet implemented.
DeltaFile
+90-1mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+83-3mlir/test/Target/LLVMIR/openmp-todo.mlir
+64-6flang/lib/Lower/OpenMP/OpenMP.cpp
+60-0mlir/test/Dialect/OpenMP/invalid.mlir
+50-0mlir/test/Target/LLVMIR/openmp-target-in-reduction.mlir
+28-0flang/test/Lower/OpenMP/target-inreduction.f90
+375-103 files not shown
+412-309 files