LLVM/project 2f01ce7 — llvm/lib/Transforms/Vectorize VPlanAnalysis.cpp, llvm/test/Transforms/LoopVectorize/AArch64 no_vector_instructions.ll reg-usage.ll

[VPlan] Only treat recipes as ephemeral if all defined values are. (#249290)

Only treat a recipe as ephemeral if all its defined values are only used
by ephemeral recipes. This fixes register usage computation and the
check whether a plan generates vectors for interleave groups with a
member only used by an assume.
DeltaFile
+6-4llvm/test/Transforms/LoopVectorize/AArch64/reg-usage.ll
+4-3llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
+2-3llvm/test/Transforms/LoopVectorize/AArch64/no_vector_instructions.ll
+12-103 files

LLVM/project fb1bb53 — llvm/utils/gn/secondary/lldb/source/Plugins BUILD.gn

[gn] port 5e2518f2cc54 (#249300)
DeltaFile
+8-0llvm/utils/gn/secondary/lldb/source/Plugins/BUILD.gn
+8-01 files

LLVM/project e18b1ce — llvm/utils/gn/secondary/lldb/source/Plugins BUILD.gn, llvm/utils/gn/secondary/lldb/source/Plugins/SymbolFile/DWARF BUILD.gn

[gn] port 707da25212e7 (lldb Fortran plugin) (#249299)
DeltaFile
+15-0llvm/utils/gn/secondary/lldb/source/Plugins/TypeSystem/Fortran/BUILD.gn
+4-0llvm/utils/gn/secondary/lldb/source/Plugins/BUILD.gn
+1-0llvm/utils/gn/secondary/lldb/source/Plugins/SymbolFile/DWARF/BUILD.gn
+20-03 files

LLVM/project 7309149 — llvm/include/llvm/CodeGen MIRFSDiscriminator.h

[CodeGen] Remove unused members in MIRAddFSDiscriminatorsLegacy (NFC) (#249270)

This patch removes getMachineFunction and MF from
MIRAddFSDiscriminatorsLegacy.  getMachineFunction has no callers, and
MF has no writers.

Assisted-by: Antigravity
DeltaFile
+0-4llvm/include/llvm/CodeGen/MIRFSDiscriminator.h
+0-41 files

LLVM/project ede36ee — llvm/utils/gn/secondary/libcxx/include BUILD.gn, llvm/utils/gn/secondary/libcxx/src BUILD.gn

[gn] port 8932712d6cfd (#249298)
DeltaFile
+3-0llvm/utils/gn/secondary/libcxx/src/BUILD.gn
+3-0llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+6-02 files

LLVM/project 36ad8bb — llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn] port 6d7134ffe1bc (#249297)
DeltaFile
+1-0llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+1-01 files

LLVM/project d15b0c1 — llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc BUILD.gn, llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/Orc BUILD.gn

[gn] port 8265c78c7a61 (#249296)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/Orc/BUILD.gn
+1-0llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn
+2-02 files

LLVM/project 6ed28b2 — llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc BUILD.gn

[gn] port ea049faec270 (#249295)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn
+1-01 files

LLVM/project 62abc26 — llvm/utils/gn/secondary/llvm/lib/DebugInfo/PDB BUILD.gn

[gn] port ba183902f702 (#249294)
DeltaFile
+2-1llvm/utils/gn/secondary/llvm/lib/DebugInfo/PDB/BUILD.gn
+2-11 files

LLVM/project b7473c8 — llvm/utils/gn/secondary/lldb/source/Plugins/TypeSystem/Clang BUILD.gn, llvm/utils/gn/secondary/lldb/test BUILD.gn

[gn] port acd65f9df260 (#249293)
DeltaFile
+1-1llvm/utils/gn/secondary/lldb/source/Plugins/TypeSystem/Clang/BUILD.gn
+0-1llvm/utils/gn/secondary/lldb/test/BUILD.gn
+1-22 files

LLVM/project 5197baa — llvm/test/Transforms/LowerMatrixIntrinsics select.ll transpose-opts.ll

[Matrix] Enable IRBuilder GEP canonicalization (#249283)

Assisted-by: LLM
DeltaFile
+132-132llvm/test/Transforms/LowerMatrixIntrinsics/multiply-fused-loops-large-matrixes.ll
+60-60llvm/test/Transforms/LowerMatrixIntrinsics/multiply-fused-lifetime-ends.ll
+58-58llvm/test/Transforms/LowerMatrixIntrinsics/binop.ll
+43-43llvm/test/Transforms/LowerMatrixIntrinsics/phi.ll
+34-34llvm/test/Transforms/LowerMatrixIntrinsics/transpose-opts.ll
+31-31llvm/test/Transforms/LowerMatrixIntrinsics/select.ll
+358-35828 files not shown
+598-60134 files

LLVM/project c9680c4 — clang/include/clang/Analysis/Analyses/LifetimeSafety LifetimeSafety.h Facts.h, clang/lib/Analysis/LifetimeSafety Dataflow.h

[LifetimeSafety] Never destroy the dataflow states (#248628)
DeltaFile
+25-6clang/lib/Analysis/LifetimeSafety/Dataflow.h
+4-0clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
+1-0clang/include/clang/Analysis/Analyses/LifetimeSafety/LifetimeSafety.h
+30-63 files

LLVM/project 15f9cb0 — llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/X86 vec_ctbits.ll expand-vp-int-intrinsics.ll

[X86] Compute `CTLZ` using fp math for `v4i32` on SSE2 targets (#190930)

This PR implements optimization for the `ISD::CTLZ` and
`ISD::CTLZ_ZERO_POISON` for X86 SSE2 target.

This PR builds upon #167034 

Closes #161746

Co-authored-by: NishiB137 <cs23btech11041 at iith.ac.in>
Co-authored-by: VindhyaP312 <cs23btech11044 at iith.ac.in>
Co-authored-by: Simon Pilgrim <llvm-dev at redking.me.uk>
DeltaFile
+32-140llvm/test/CodeGen/X86/vector-lzcnt-128.ll
+44-57llvm/test/CodeGen/X86/arbitrary-fp-to-float.ll
+52-0llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+8-38llvm/test/CodeGen/X86/combine-srl.ll
+8-35llvm/test/CodeGen/X86/vec_ctbits.ll
+8-35llvm/test/CodeGen/X86/expand-vp-int-intrinsics.ll
+152-3053 files not shown
+169-3409 files

LLVM/project fd82a4e — llvm/lib CMakeLists.txt

[CMake] Enforce -Wglobal-constructors for more libraries (#249281)

They no longer have C++ dynamic initialization.
DeltaFile
+0-9llvm/lib/CMakeLists.txt
+0-91 files

LLVM/project acd5a45 — llvm/test/CodeGen/RISCV zfhmin-imm.ll half-imm.ll

[RISCV] Remove unused variable in tests. NFC (#249062)
DeltaFile
+2-2llvm/test/CodeGen/RISCV/zfhmin-imm.ll
+2-2llvm/test/CodeGen/RISCV/half-imm.ll
+2-2llvm/test/CodeGen/RISCV/float-imm.ll
+6-63 files

LLVM/project b8f5418 — llvm/lib/Transforms/IPO SampleProfile.cpp, llvm/test/Transforms/SampleProfile recovery-recursion-alias.ll icp-rejected-context-merge.ll

[SampleProfile] Recover hot contexts rejected by indirect-call promotion (#243628)

A sample profile can record samples for an indirect-call target under
its caller, as if the compiler had inlined the target. If the compiler
leaves the target out of line, those samples belong in the target's
standalone profile. Leaving them under the caller makes the standalone
function appear colder than it is.

This patch recovers those samples in both sample-profile inliners:
- Priority inliner: A target can be hot in absolute terms but account
for too few calls at a site to qualify for promotion. Previously, the
loader stopped at the first target that failed the percentage check. It
now records that target and continues through the remaining hot targets.
It stops when the targets are no longer hot. Several rejected targets at
the same call can therefore recover their samples.
- Iterative inliner (line-based AutoFDO): When the compiler promotes and
inlines one target, an indirect fallback remains for the other targets.
A later scan can mistake the already-inlined target for one that still
needs recovery. Tracking only one target per call can also miss other

    [19 lines not shown]
DeltaFile
+102-60llvm/lib/Transforms/IPO/SampleProfile.cpp
+84-0llvm/test/Transforms/SampleProfile/icp-rejected-context-merge.ll
+84-0llvm/test/Transforms/SampleProfile/inline-indirect-iterative.ll
+49-0llvm/test/Transforms/SampleProfile/recovery-recursion-alias.ll
+31-0llvm/test/Transforms/SampleProfile/Inputs/icp-rejected-context-merge.prof
+9-0llvm/test/Transforms/SampleProfile/Inputs/inline-indirect-iterative.prof
+359-606 files

LLVM/project 2a4ed76 — llvm/lib/Analysis CtxProfAnalysis.cpp, llvm/lib/IR IROptions.td ProfDataUtils.cpp

[Passes] Declare -enable-profcheck-in-pipeline and -use-ctx-profile in TableGen (#249267)

Move them into IROptions and AnalysisOptions with exported getters.
CtxProfAnalysis reads -use-ctx-profile in run() instead of its
constructor.

Renames, with the old spellings kept as aliases:

```
-enable-profcheck-in-pipeline  -> -profcheck-in-pipeline
```

Co-authored-by: Alexis Engelke <mail at aengelke.net>
DeltaFile
+28-27llvm/lib/Passes/PassBuilderPipelines.cpp
+23-19llvm/lib/Transforms/IPO/FunctionImport.cpp
+11-14llvm/lib/Analysis/CtxProfAnalysis.cpp
+9-11llvm/lib/IR/ProfDataUtils.cpp
+8-4llvm/lib/Passes/CodeGenPassBuilder.cpp
+8-0llvm/lib/IR/IROptions.td
+87-753 files not shown
+104-759 files

LLVM/project 9e18a56 — llvm/lib/Target/RISCV RISCVISelDAGToDAG.h RISCVISelDAGToDAG.cpp

[RISCV] Replace some uses of SplatFPOp with a ComplexPattern. NFC (#249166)

SplatFPOp is a PatFrag that checks 2 different opcodes. Every time it is
used we create 2 isel patterns. Since all those patterns handle multiple
element types and LMULs, this quickly adds up.

Replace it with a ComplexPattern like we do for integer. This reduces
the isel table size by 9.3%.

Assisted-by: Claude
DeltaFile
+22-18llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
+17-17llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
+11-0llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+1-0llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
+51-354 files

LLVM/project 67458f7 — llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 concat-repeated-load-dup.ll arm64-build-vector.ll

[AArch64]Duplicate the repeated lower half of 128-bit build vectors

A 128-bit build vector whose upper half repeats the lower half, e.g.
(a, b, a, b), was lowered with one lane insert per element. Build the
lower half once and concatenate it with itself. Undef upper lanes match
anything; an all-undef upper half is left to the insert sequence, where
it needs no copy.

Assisted-by: Cursor

Pull-request: https://github.com/llvm/llvm-project/pull/247230
Reviewers: davemgreen, huntergr-arm, john-brawn-arm, paulwalker-arm, sdesmalen-arm
Reviewed-by: sdesmalen-arm
DeltaFile
+61-33llvm/test/CodeGen/AArch64/arm64-build-vector.ll
+22-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+4-14llvm/test/CodeGen/AArch64/concat-repeated-load-dup.ll
+87-473 files

LLVM/project 02b5114 — mlir/lib/Dialect/OpenACC/Transforms ACCRecipeMaterialization.cpp

[mlir][OpenACC] Fix assertion macro expansion (#248975)

ACC_COMPUTE_CONSTRUCT_AND_LOOP_OPS expands to a comma-separated type
list. On systems where assert forwards its expression to another macro,
the commas are parsed as separate macro arguments.

Wrap the isa expression in an extra parenthesized group so it is passed
as one macro argument.
DeltaFile
+1-1mlir/lib/Dialect/OpenACC/Transforms/ACCRecipeMaterialization.cpp
+1-11 files

LLVM/project 1601a47 — llvm/include/llvm/CodeGen TargetLowering.h, llvm/lib/Target/LoongArch LoongArchISelLowering.h LoongArchISelLowering.cpp

[DAG] Treat truncating an extend back to its source type as free (#249269)

I changed TargetLowering::isTruncateFree(SDValue, EVT) to treat
truncating a sign/zero/any extend back to its source type as free, since
the truncate just gives back the extend's operand. This is split out of
#236194 as requested there. That PR uses it to decide whether narrowing
uitofp vXi64 is worth it with AVX512DQ.

On its own, this lets the generic uitofp narrowing fold in DAGCombiner
handle `uitofp (zext <4 x i32> to <4 x i64>)`, which X86 used to
scalarize. The first commit adds a test for it with the current codegen.

It also lets the generic [su]itofp narrowing fold fire on other vector
extends. LoongArch and X86 both widen narrow vector sources in their own
[su]itofp combines, so the two folds kept undoing each other and
DAGCombiner hung (LoongArch lasx/ir-instruction/uitofp.ll, and X86
select-narrow-int-to-fp.ll with +avx512fp16). I fixed it by making both
targets reject the narrower type in isTypeDesirableForOp(SDNode *, EVT),
the same way SystemZ and AMDGPU already handle it.

    [3 lines not shown]
DeltaFile
+77-0llvm/test/CodeGen/X86/vec_int_to_fp.ll
+10-0llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+7-0llvm/lib/Target/X86/X86ISelLowering.cpp
+3-0llvm/include/llvm/CodeGen/TargetLowering.h
+1-0llvm/lib/Target/LoongArch/LoongArchISelLowering.h
+98-05 files

LLVM/project b4a1958 — llvm/lib/Target/AArch64/GISel AArch64CallLowering.cpp, llvm/test/CodeGen/AArch64 pr53315-returned-i128.ll

[AArch64][GlobalISel] Add implicit defs for returned phyregs. (#248399)

This fixes a verifier error where physregs for a returned [2 x i64]
argument were not marked as defs on the call, leading them to being
undefined at point of use. As the argument in returned, the register may
be the origin reg used to set up the call, so only physregs need to be
added.
DeltaFile
+74-15llvm/test/CodeGen/AArch64/pr53315-returned-i128.ll
+26-0llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-callreturned.ll
+4-1llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
+104-163 files

LLVM/project 69aca0d — llvm/lib/Analysis InstructionSimplify.cpp, llvm/test/CodeGen/AMDGPU amdgpu-simplify-libcall-rootn.ll amdgpu-simplify-libcall-pow.ll

[InstSimplify] Fold vector infinity arms of ninf selects

Reuse m_Inf() for vector constants. When every defined lane of an arm
is an infinity, selecting it yields poison in that lane, so the other
arm is a valid replacement. Keep the select if any lane is finite.

AI assisted.
DeltaFile
+30-48llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow.ll
+19-0llvm/test/Transforms/InstSimplify/select-ninf.ll
+4-7llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-rootn.ll
+1-1llvm/lib/Analysis/InstructionSimplify.cpp
+54-564 files

LLVM/project 8d6463c — llvm/lib/Transforms/Utils CloneFunction.cpp

CloneFunction: Use depth_first_ext to find reachable blocks

Cleanup the manual loop doing a DFS.

Assisted-by: Claude
DeltaFile
+4-8llvm/lib/Transforms/Utils/CloneFunction.cpp
+4-81 files

LLVM/project 724ef34 — clang/lib/Driver/ToolChains AMDGPU.cpp, clang/test/Driver hipstdpar.c

[Driver][AMDGPU] Search include/hipccl for hipstdpar/rocThrust headers (#246125)

Newer ROCm installs rocThrust under include/hipccl/thrust. Prefer it with --hipstdpar,
falling back to include/thrust.

AI assisted.

Co-authored-by: Yaxun (Sam) Liu <yaxun.liu at amd.com>
DeltaFile
+50-33clang/lib/Driver/ToolChains/AMDGPU.cpp
+26-0clang/test/Driver/hipstdpar.c
+0-0clang/test/Driver/Inputs/rocm/include/hipccl/thrust/system/hip/hipstdpar/hipstdpar_lib.hpp
+0-0clang/test/Driver/Inputs/rocm/include/hipccl/rocprim/.keep
+76-334 files

LLVM/project 948413b — llvm/test/CodeGen/AMDGPU llvm.amdgcn.update.dpp.ll load-constant-i32.ll

Review comments again x2

Change-Id: Ida8726ec805298e9e5398dbba9ab2814c5bf8a03
DeltaFile
+536-388llvm/test/CodeGen/AMDGPU/local-atomicrmw-fadd.ll
+305-305llvm/test/CodeGen/AMDGPU/load-constant-i1.ll
+108-108llvm/test/CodeGen/AMDGPU/flat-saddr-atomics.ll
+110-87llvm/test/CodeGen/AMDGPU/packed-fp64.ll
+69-68llvm/test/CodeGen/AMDGPU/load-constant-i32.ll
+62-62llvm/test/CodeGen/AMDGPU/llvm.amdgcn.update.dpp.ll
+1,190-1,01840 files not shown
+1,735-1,52046 files

LLVM/project 3d29297 — llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/RISCV/rvv fixed-vectors-extract.ll

DAG: Use poison instead of undef in SimplifyDemandedVectorElts

I left getKnownUndefForVectorBinop since I'm not sure
if it's correct to just replace with poison.
DeltaFile
+37-45llvm/test/CodeGen/X86/combine-sdiv.ll
+5-23llvm/test/CodeGen/X86/vector-shuffle-combining.ll
+10-10llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+8-4llvm/test/CodeGen/X86/combine-udiv.ll
+2-4llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract.ll
+1-1llvm/test/CodeGen/X86/urem-vector-lkk.ll
+63-876 files

LLVM/project 30f07f1 — clang-tools-extra/clangd Protocol.h InlayHints.cpp, clang-tools-extra/clangd/unittests InlayHintTests.cpp

[clangd] Show member names in structured binding inlay hints (#245943)

Show which member each structured binding refers to. For example,
`auto [.name=n: string, age: int] = person;`. The hint is omitted when
the binding has the same name as the member.

The hint is placed before the binding's name, consistent with the
existing
designator hints for aggregate initialization. It is controlled by the
existing `InlayHints.Designators` option.

Fixes clangd/clangd#2727

Assisted-by: Claude Code
DeltaFile
+96-0clang-tools-extra/clangd/unittests/InlayHintTests.cpp
+18-0clang-tools-extra/clangd/InlayHints.cpp
+5-0clang-tools-extra/docs/ReleaseNotes.md
+2-0clang-tools-extra/clangd/Protocol.h
+121-04 files

LLVM/project d0878ea — llvm/lib/Target/RISCV/MCTargetDesc RISCVAsmBackend.cpp, llvm/test/MC/RISCV symbol-difference-insn-relax-invalid.s pcrel-dot-difference.s

Revert #247981 "[RISCV][MC] Diagnose symbol differences in instructions under relaxation" (#248804)

This reverts commit dc963db2bdd1166b5a6fb0fc0d95a6de1a86da4a.

The patch resolves `sym - .` in a PC-relative operand to `sym` by
comparing addresses, so identical lines assemble differently:

```
# llvm-mc -triple=riscv64 -mattr=+relax -filetype=obj a.s
  nop
L:
  beq a0, a1, X - L
  beq a0, a1, X - L  # error: unsupported symbol difference in instruction
  nop
X:
  ret
```

The diagnostic part will reland separately.
DeltaFile
+0-53llvm/test/MC/RISCV/pcrel-dot-difference.s
+2-40llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
+0-26llvm/test/MC/RISCV/symbol-difference-insn-relax-invalid.s
+2-1193 files

LLVM/project 049b418 — llvm/lib/Target/AArch64 AArch64SchedOlympus.td, llvm/test/tools/llvm-mca/AArch64/Olympus sve-instructions.s

[AArch64] Update the Olympus scheduling model as per the SWOG changes (#248907)

The Olympus SWOG
https://docs.nvidia.com/olympus-cpu-core-software-optimization-guide-dp12531-001v0-7.pdf
has been updated for some AArch64 instructions, summarised below. We
update the Olympus scheduling model with updated schedules for the
following instruction groups.

| SWOG group | Old | New |
|---|---|---|
| Reduction (logical) | Lat 6 | Lat 5 |
| Reduction (add, B form) | Lat 11 | Lat 10 |
| Reduction (add, H form) | Lat 9 | Lat 8 |
| Reduction (add, S form) | Lat 8 | Lat 7 |
| Reduction (min/max, B form) | Lat 9 | Lat 8 |
| Reduction (min/max, H form) | Lat 8 | Lat 7 |
| Reduction (min/max, S form) | Lat 6 | Lat 5 |
| Reduction (D form) | Lat 5 (`UADDV` D: n/a, new) | Lat 4 |
| FP reduction (F16) | Lat 8 | Lat 12 |

    [4 lines not shown]
DeltaFile
+75-75llvm/test/tools/llvm-mca/AArch64/Olympus/sve-instructions.s
+17-20llvm/lib/Target/AArch64/AArch64SchedOlympus.td
+92-952 files