LLVM/project ab94dbcclang/lib/AST/ByteCode Interp.cpp Pointer.cpp, clang/test/AST/ByteCode cxx20.cpp

[clang][bytecode] Mark pointers destroyed in destructors (#192460)

We didn't use to do this at all, so calling the destructor explicitly
twice in a row wasn't an error. Calling it and accessing the object
afterwards wasn't an error either.
DeltaFile
+39-23clang/lib/AST/ByteCode/Interp.cpp
+13-25clang/lib/AST/ByteCode/Pointer.cpp
+19-8clang/test/AST/ByteCode/cxx20.cpp
+3-0clang/lib/AST/ByteCode/Compiler.cpp
+1-0clang/lib/AST/ByteCode/Descriptor.h
+1-0clang/lib/AST/ByteCode/Pointer.h
+76-562 files not shown
+78-568 files

LLVM/project 8398672llvm/test/CodeGen/LoongArch/lasx/ir-instruction fptrunc.ll, llvm/test/CodeGen/LoongArch/lsx/ir-instruction fptrunc.ll

[LoongArch][NFC] Pre-commit tests for vector fptrunc from vxf64 to vxf32 (#164058)
DeltaFile
+117-0llvm/test/CodeGen/LoongArch/lasx/ir-instruction/fptrunc.ll
+112-0llvm/test/CodeGen/LoongArch/lsx/ir-instruction/fptrunc.ll
+229-02 files

LLVM/project 2487d43llvm/lib/Target/LoongArch LoongArchISelLowering.cpp

stricter restrictions on original types
DeltaFile
+5-4llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+5-41 files

LLVM/project e1878d7llvm/lib/Target/LoongArch LoongArchISelLowering.cpp LoongArchLSXInstrInfo.td, llvm/test/CodeGen/LoongArch/lasx/ir-instruction fptrunc.ll

[LoongArch] Add support for vector FP_ROUND from vxf64 to vxf32

In LoongArch, [x]vfcvt.s.d intstructions require two vector registers
for v4f64->v4f32, v8f64->v8f32 conversions.

This patch handles these cases:
- For FP_ROUND v2f64->v2f32(illegal), add a customized v2f32 widening
  to convert it into a target-specific LoongArchISD::VFCVT.
- For FP_ROUND v4f64->v4f32, on LSX platforms, v4f64 is illegal and will
  be split into two v2f64->v2f32, resulting in two LoongArchISD::VFCVT.
  Finally, they are combined into a single node during combining
  LoongArchISD::VPACKEV. On LASX platforms, v4f64->v4f32 can directly
  lower to vfcvt.s.d in lowerFP_ROUND.
- For FP_ROUND v8f64->v8f32, on LASX platforms, v8f64 is illegal and
  will be split into two v4f64->v4f32 and then combine using
  ISD::CONCAT_VECTORS, so xvfcvt.s.d is generated during its
  combination.
DeltaFile
+131-0llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+10-38llvm/test/CodeGen/LoongArch/lasx/ir-instruction/fptrunc.ll
+5-22llvm/test/CodeGen/LoongArch/lsx/ir-instruction/fptrunc.ll
+7-0llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
+2-0llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
+1-1llvm/lib/Target/LoongArch/LoongArchISelLowering.h
+156-616 files

LLVM/project 2acb741llvm/lib/Target/LoongArch LoongArchISelLowering.cpp, llvm/test/CodeGen/LoongArch/lasx/ir-instruction fptrunc.ll

fixes according reviews
DeltaFile
+4-27llvm/test/CodeGen/LoongArch/lasx/ir-instruction/fptrunc.ll
+2-12llvm/test/CodeGen/LoongArch/lsx/ir-instruction/fptrunc.ll
+9-2llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+15-413 files

LLVM/project 7cb8a80llvm/lib/Target/LoongArch LoongArchLASXInstrInfo.td LoongArchLSXInstrInfo.td, llvm/lib/Target/LoongArch/AsmParser LoongArchAsmParser.cpp

Address wanglei's comments
DeltaFile
+12-24llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
+12-24llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
+1-4llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
+0-1llvm/lib/Target/LoongArch/AsmParser/LoongArchAsmParser.cpp
+25-534 files

LLVM/project 85f485ellvm/lib/Target/LoongArch LoongArchLSXInstrInfo.td LoongArchLASXInstrInfo.td, llvm/test/CodeGen/LoongArch/lsx/ir-instruction and.ll xor.ll

[LoongArch] Select `V{AND,OR,XOR,NOR}I.B` for bitwise with byte splat immediates

The `V{AND,OR,XOR,NOR}I.B` instructions operate on byte elements and accept
an 8-bit immediate. However, when the same byte splat constant is used with
wider vector element types (e.g. v8i16, v4i32, v2i64), instruction selection
currently falls back to materializing the constant in a temporary register.

```
vrepli.b  -1
vxor.v
```

even though the immediate form is available:

```
vxori.b 255
```

This happens because selectVSplatImm requires the splat bit width to match

    [11 lines not shown]
DeltaFile
+29-2llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
+24-0llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
+3-6llvm/test/CodeGen/LoongArch/lsx/ir-instruction/and.ll
+3-6llvm/test/CodeGen/LoongArch/lsx/ir-instruction/xor.ll
+3-6llvm/test/CodeGen/LoongArch/lsx/ir-instruction/or.ll
+3-6llvm/test/CodeGen/LoongArch/lsx/ir-instruction/icmp.ll
+65-2614 files not shown
+102-8520 files

LLVM/project 35b981bllvm/lib/Target/LoongArch LoongArchISelDAGToDAG.cpp

Address wanglei's comments
DeltaFile
+3-4llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp
+3-41 files

LLVM/project 0c4cb19llvm/lib/Target/LoongArch LoongArchISelDAGToDAG.cpp

Fix a typo
DeltaFile
+1-1llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp
+1-11 files

LLVM/project a758238llvm/lib/Target/LoongArch LoongArchISelDAGToDAG.cpp LoongArchLSXInstrInfo.td, llvm/test/CodeGen/LoongArch/lasx/ir-instruction add.ll sub.ll

[LoongArch] Select V{ADD,SUB}I for operations with negative splat immediates

Currently, vector add/sub with a negative splat immediate is lowered as a
vector splat followed by a register-register add, e.g.:

```
vrepli.b $vr1, -1
vadd.b   $vr0, $vr0, $vr1
```

This misses the opportunity to use the more efficient V{ADD,SUB}I instruction
with a positive immediate.

This patch introduces `selectVSplatImmNeg` to detect negative splat
immediates whose negated value fits in a 5-bit unsigned immediate. New
patterns `(Pat{Vr,Vr}Nimm5)` are added to match:

```
add v, splat(-imm)  -->  vsubi v, v, imm

    [7 lines not shown]
DeltaFile
+22-0llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp
+17-0llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
+5-10llvm/test/CodeGen/LoongArch/lsx/ir-instruction/sub.ll
+5-10llvm/test/CodeGen/LoongArch/lasx/ir-instruction/add.ll
+5-10llvm/test/CodeGen/LoongArch/lasx/ir-instruction/sub.ll
+5-10llvm/test/CodeGen/LoongArch/lsx/ir-instruction/add.ll
+59-402 files not shown
+74-408 files

LLVM/project 2bac8d6llvm/test/CodeGen/LoongArch/lasx/ir-instruction nor.ll and.ll, llvm/test/CodeGen/LoongArch/lsx/ir-instruction nor.ll and.ll

[LoongArch][NFC] Add tests for bitwise with byte splat immediates (#192216)
DeltaFile
+36-0llvm/test/CodeGen/LoongArch/lsx/ir-instruction/nor.ll
+36-0llvm/test/CodeGen/LoongArch/lasx/ir-instruction/nor.ll
+33-0llvm/test/CodeGen/LoongArch/lsx/ir-instruction/and.ll
+33-0llvm/test/CodeGen/LoongArch/lsx/ir-instruction/or.ll
+33-0llvm/test/CodeGen/LoongArch/lsx/ir-instruction/xor.ll
+33-0llvm/test/CodeGen/LoongArch/lasx/ir-instruction/and.ll
+204-02 files not shown
+270-08 files

LLVM/project 7cabc53llvm/test/CodeGen/LoongArch/lasx/ir-instruction add.ll sub.ll, llvm/test/CodeGen/LoongArch/lsx/ir-instruction add.ll sub.ll

[LoongArch][NFC] Add tests for add/sub with negative splat immediates (#191965)
DeltaFile
+66-0llvm/test/CodeGen/LoongArch/lsx/ir-instruction/add.ll
+66-0llvm/test/CodeGen/LoongArch/lasx/ir-instruction/add.ll
+66-0llvm/test/CodeGen/LoongArch/lasx/ir-instruction/sub.ll
+66-0llvm/test/CodeGen/LoongArch/lsx/ir-instruction/sub.ll
+264-04 files

LLVM/project 6527bf9llvm/test/CodeGen/AMDGPU/NextUseAnalysis spill-vreg-many-lanes.mir acyclic-770bb.mir

Merge branch 'main' into users/ylzsx/precommit-fptrunc
DeltaFile
+275,101-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/spill-vreg-many-lanes.mir
+144,679-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/acyclic-770bb.mir
+57,682-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/double-nested-loops-complex-cfg.mir
+41,844-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills2.mir
+40,613-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills1.mir
+37,209-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills3.mir
+597,128-01,735 files not shown
+976,030-41,5901,741 files

LLVM/project 685ee06utils/bazel/llvm-project-overlay/libc BUILD.bazel

[Bazel] Fixes 7094eb5 (#192584)

This fixes 7094eb52d8cbaa9faeb635bfb6f6c06e6cd52b64.

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+12-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+12-01 files

LLVM/project 7094eb5libc/src/__support/threads futex_utils.h raw_rwlock.h, libc/src/__support/threads/darwin futex_utils.h

[libc][threads] adjust futex library and expose requeue API (#192478)

Make futex a common abstraction layer across platforms.
(linux/wasm/macOS/windows/fuchsia all have the support, which we can
align their support later on).

This patch also expose a requeue API that returns ENOSYS on unsupported
platforms. The requeue operation will be needed to reimplement a strict
FIFO style condvar similar to musl.

Additional cleanup is done to change raw syscall return value to
`ErrorOr<int>`.

Assisted-by: Codex with gpt-5.4 medium fast
DeltaFile
+64-29libc/src/__support/threads/linux/futex_utils.h
+54-26libc/src/__support/threads/darwin/futex_utils.h
+80-0libc/test/integration/src/__support/threads/futex_requeue_test.cpp
+37-0libc/test/src/__support/threads/futex_utils_test.cpp
+20-0libc/src/__support/threads/futex_utils.h
+8-7libc/src/__support/threads/raw_rwlock.h
+263-627 files not shown
+305-7313 files

LLVM/project 91fcdabmlir/lib/Dialect/MemRef/Transforms FoldMemRefAliasOps.cpp, mlir/test/Dialect/MemRef fold-memref-alias-ops.mlir

[mlir][memref] Remove unit-stride restriction in SubViewOp folding  (#192437)

This PR replaces manual offset/size resolution with `affine::mergeOffsetsSizesAndStrides`, simplifying the code and extending subview-of-subview folding to support non-unit strides.
DeltaFile
+8-26mlir/lib/Dialect/MemRef/Transforms/FoldMemRefAliasOps.cpp
+22-0mlir/test/Dialect/MemRef/fold-memref-alias-ops.mlir
+30-262 files

LLVM/project 7f6c395llvm/include/llvm/Transforms/IPO LowerTypeTests.h, llvm/lib/Passes PassBuilder.cpp PassRegistry.def

enum

Created using spr 1.3.7
DeltaFile
+20-0llvm/lib/Passes/PassBuilder.cpp
+13-6llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+12-3llvm/include/llvm/Transforms/IPO/LowerTypeTests.h
+3-6llvm/lib/Passes/PassRegistry.def
+1-1llvm/lib/Passes/PassBuilderPipelines.cpp
+49-165 files

LLVM/project fb0861bllvm/lib/Passes PassBuilderPipelines.cpp

comment

Created using spr 1.3.7
DeltaFile
+1-1llvm/lib/Passes/PassBuilderPipelines.cpp
+1-11 files

LLVM/project 62032d3clang/lib/CodeGen BackendUtil.cpp, llvm/include/llvm/Transforms/IPO LowerTypeTests.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+43-47llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+13-14llvm/include/llvm/Transforms/IPO/LowerTypeTests.h
+7-14llvm/lib/Passes/PassBuilderPipelines.cpp
+8-0llvm/lib/Passes/PassRegistry.def
+1-4clang/lib/CodeGen/BackendUtil.cpp
+2-2llvm/test/Other/new-pm-O0-defaults.ll
+74-819 files not shown
+84-9115 files

LLVM/project 27769d7llvm/lib/Target/RISCV RISCVInstrInfo.cpp RISCVInstrInfo.h, llvm/test/CodeGen/RISCV machine-outliner-x5-regsave-rv32e.mir machine-outliner-reserved-regs.mir

[RISCV] Support MachineOutlinerRegSave for RISCV (#191351)

This patch adds support for the RegSave strategy in the RISC-V
MachineOutliner pass. It uses t1–t6 to preserve the t0 value across the
outlined function call when t0 is unavailable. This enables more
potential outlining candidates.

---------

Co-authored-by: Craig Topper <craig.topper at sifive.com>
DeltaFile
+250-0llvm/test/CodeGen/RISCV/machine-outliner-x5-regsave-rv32e.mir
+166-0llvm/test/CodeGen/RISCV/machine-outliner-reserved-regs.mir
+116-0llvm/test/CodeGen/RISCV/machine-outliner-x5-regsave.mir
+90-7llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+6-6llvm/test/CodeGen/RISCV/machine-outliner-call-x5-liveout.mir
+1-0llvm/lib/Target/RISCV/RISCVInstrInfo.h
+629-136 files

LLVM/project 114f662llvm/tools/llvm-readobj ELFDumper.cpp

[llvm-readobj][ELF] Remove redundant error in reportWarning (#192458)
DeltaFile
+1-2llvm/tools/llvm-readobj/ELFDumper.cpp
+1-21 files

LLVM/project 0331209llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/test/CodeGen/RISCV/rvv buildvec-sext.ll

[DAGCombiner] Extend convertBuildVecZextToZext to sign extends (#192372)

Generalize the existing fold that collapses a BUILD_VECTOR of ZERO_EXTEND
(or ANY_EXTEND) of EXTRACT_VECTOR_ELTs into a single vector extend so that
it also handles SIGN_EXTEND. Mixed sign and zero extends remain unsupported
because their high-bit semantics differ, so the combine bails out in that
case.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply at anthropic.com>
DeltaFile
+88-0llvm/test/CodeGen/RISCV/rvv/buildvec-sext.ll
+20-9llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+108-92 files

LLVM/project e836103llvm/lib/Target/AMDGPU AMDGPUAsmPrinter.cpp SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU lds-link-time-codegen.ll lds-link-time-codegen-named-barrier.ll

[AMDGPU] Emit the relocation symbol for LDS and named barrier when object linking is enabled
DeltaFile
+50-0llvm/test/CodeGen/AMDGPU/lds-link-time-codegen.ll
+35-0llvm/test/CodeGen/AMDGPU/lds-link-time-codegen-named-barrier.ll
+12-3llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+12-0llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+109-34 files

LLVM/project 2dbe45allvm/docs AMDGPUUsage.rst, llvm/lib/Target/AMDGPU AMDGPUAsmPrinter.cpp

[AMDGPU] Add `.amdgpu.info` section for per-function metadata

AMDGPU object linking requires the linker to propagate resource usage
(registers, stack, LDS) across translation units. To support this, the compiler
must emit per-function metadata and call graph edges in the relocatable object
so the linker can compute whole-program resource requirements.

This PR introduces a `.amdgpu.info` ELF section using a tagged, length-prefixed
binary format: each entry is encoded as:

```
[kind: u8] [len: u8] [payload: <len> bytes]
```

A function scope is opened by an `INFO_FUNC` entry (containing a symbol
reference), followed by per-function attributes (register counts, flags, private
segment size) and relational edges (direct calls, LDS uses, indirect call
signatures). String data such as function type signatures is stored in a
companion `.amdgpu.strtab` section.

    [4 lines not shown]
DeltaFile
+198-0llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
+172-2llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+116-0llvm/test/MC/AMDGPU/amdgpu-info-roundtrip.s
+111-0llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+110-0llvm/docs/AMDGPUUsage.rst
+83-0llvm/test/CodeGen/AMDGPU/lds-link-time-codegen-typeid.ll
+790-211 files not shown
+1,203-1417 files

LLVM/project c78f80cclang/test/CIR/IR branch.cir for.cir

[CIR][NFC] Upstream IR roundtrip tests for branch and loop ops (#189006)

Add `clang/test/CIR/IR` roundtrip tests for `cir.br`, `cir.brcond`,
`cir.for`, `cir.while`, and `cir.do`.

This adds parser/printer coverage for the textual forms of these
control-flow operations.

Partially addresses #156747.
DeltaFile
+33-0clang/test/CIR/IR/branch.cir
+21-0clang/test/CIR/IR/for.cir
+17-0clang/test/CIR/IR/do-while.cir
+17-0clang/test/CIR/IR/while.cir
+88-04 files

LLVM/project 4b6231dflang/include/flang/Support Fortran.h, flang/lib/Parser Fortran-parsers.cpp

[flang][cuda] Accept attributes(value) as a CUDA Fortran extension (#192560)

This is accepted by legacy compiler and is part of some documentation
DeltaFile
+9-1flang/test/Lower/CUDA/cuda-data-attribute.cuf
+7-0flang/test/Semantics/cuf03.cuf
+5-1flang/lib/Semantics/resolve-names.cpp
+2-2flang/include/flang/Support/Fortran.h
+2-1flang/lib/Parser/Fortran-parsers.cpp
+2-0flang/lib/Semantics/check-declarations.cpp
+27-51 files not shown
+29-57 files

LLVM/project 3b1cc61flang-rt/lib/cuda pointer.cpp, flang/include/flang/Runtime/CUDA pointer.h

[flang][cuda] Add missing pointer deallocation entry point (#192566)

We were missing the deallocation entry point for pointer and wiring all
to allocatable deallocate which will trigger Invalid descriptor error.
DeltaFile
+21-0flang/test/Fir/CUDA/cuda-allocate.fir
+18-0flang-rt/lib/cuda/pointer.cpp
+13-4flang/lib/Optimizer/Transforms/CUDA/CUFAllocationConversion.cpp
+6-0flang/include/flang/Runtime/CUDA/pointer.h
+58-44 files

LLVM/project 2664fd3offload/test/mapping map_ordering_tgt_exit_data_always_always.c map_ordering_tgt_exit_data_delete_from.c

[NFC][OpenMP] Make map ordering tests for no host->tgt transfer more robust (#192571)

They were relying on the host value not being seen on the device, but
the value being matched was small enough for the probability of a
successful match against garbage data relatively high.

Now we just rely on the LIBOMPTARGET_DEBUG logs to ensure there wasn't
any transfer.
DeltaFile
+2-1offload/test/mapping/map_ordering_tgt_exit_data_always_always.c
+1-2offload/test/mapping/map_ordering_tgt_exit_data_delete_from.c
+1-2offload/test/mapping/map_ordering_tgt_exit_data_delete_from_assumedsize.c
+1-2offload/test/mapping/map_ordering_tgt_exit_data_from_delete_assumedsize.c
+5-74 files

LLVM/project daf814clibclc/opencl/lib/generic/atomic atomic_fetch_sub.cl atomic_fetch_add.cl

[libclc] Fix atomic_fetch_add/sub overloads for uintptr_t (#192570)

The overloads taking the memory order and/or scope parameters should
have the `_explicit` suffix, according to the OpenCL C specification.
DeltaFile
+11-13libclc/opencl/lib/generic/atomic/atomic_fetch_sub.cl
+11-13libclc/opencl/lib/generic/atomic/atomic_fetch_add.cl
+22-262 files

LLVM/project d9075b7llvm/lib/CAS MappedFileRegionArena.cpp

address review feedback

Created using spr 1.3.7
DeltaFile
+3-3llvm/lib/CAS/MappedFileRegionArena.cpp
+3-31 files