LLVM/project b74f72cllvm/test/Transforms/SLPVectorizer/AMDGPU ordered-reduction-fma-fusion.ll, llvm/test/Transforms/SLPVectorizer/NVPTX ordered-reduction-fma-fusion.ll

[NFC][SLP] Precommit tests for ordered fadd-reduction FMA-fusion cost (#210835)

Baseline coverage for an ordered fadd-of-fmul reduction that is
currently vectorized even on FMA-capable targets, breaking the scalar
fmul + fadd -> fma fusion. A follow-up teaches the reduction cost model
to account for the lost fusion and keep these reductions scalar, at
which point these CHECK lines update. Covers X86 avx2, AMDGPU gfx90a and
NVPTX sm_80.

It is a pre-requisite for
https://github.com/llvm/llvm-project/pull/210399

Assisted-By: Claude Opus 4.8
DeltaFile
+516-0llvm/test/Transforms/SLPVectorizer/AMDGPU/ordered-reduction-fma-fusion.ll
+123-0llvm/test/Transforms/SLPVectorizer/X86/slp-fma-loss-ordered.ll
+46-0llvm/test/Transforms/SLPVectorizer/NVPTX/ordered-reduction-fma-fusion.ll
+685-03 files

LLVM/project 24c4abdclang/docs InternalsManual.md

[docs] Clean up migrated Clang InternalsManual markup

Replace migrated blockquote markup in InternalsManual.md with MyST definition lists where the surrounding text is semantically a term-and-definition list.
DeltaFile
+108-108clang/docs/InternalsManual.md
+108-1081 files

LLVM/project 37ad4f4clang/docs InternalsManual.md LibASTImporter.md

[docs] Convert selected rst docs with rst2myst
DeltaFile
+1,992-2,032clang/docs/InternalsManual.md
+436-446clang/docs/LibASTImporter.md
+321-329clang/docs/LibASTMatchersTutorial.md
+290-293clang/docs/ClangOffloadBundler.md
+260-301clang/docs/ClangRepl.md
+188-208clang/docs/ClangTransformerTutorial.md
+3,487-3,60912 files not shown
+4,555-4,80418 files

LLVM/project a95de00clang/docs ClangOffloadBundler.md ClangRepl.md

[docs] Finish MyST migration for selected docs
DeltaFile
+88-137clang/docs/ClangOffloadBundler.md
+15-18clang/docs/ClangRepl.md
+14-14clang/docs/LibASTImporter.md
+11-11clang/docs/RAVFrontendAction.md
+4-4clang/docs/InternalsManual.md
+3-3clang/docs/ClangTransformerTutorial.md
+135-1877 files not shown
+145-20413 files

LLVM/project 6cc0fd9clang/docs InternalsManual.rst InternalsManual.md

[docs] Rename selected Clang docs to Markdown

Rename 18 Clang documentation files from .rst to .md. The clang-format generated docs are split into users/rnk/clang-format-md-rename and users/rnk/clang-format-md-write for separate review.
DeltaFile
+0-3,941clang/docs/InternalsManual.rst
+3,941-0clang/docs/InternalsManual.md
+658-0clang/docs/ClangRepl.md
+0-658clang/docs/ClangRepl.rst
+0-613clang/docs/LibASTImporter.rst
+613-0clang/docs/LibASTImporter.md
+5,212-5,21230 files not shown
+9,110-9,11036 files

LLVM/project b915f34clang/docs InternalsManual.md LibASTImporter.md

[docs] Convert selected rst docs with rst2myst
DeltaFile
+1,992-2,032clang/docs/InternalsManual.md
+436-446clang/docs/LibASTImporter.md
+321-329clang/docs/LibASTMatchersTutorial.md
+290-293clang/docs/ClangOffloadBundler.md
+260-301clang/docs/ClangRepl.md
+188-208clang/docs/ClangTransformerTutorial.md
+3,487-3,60912 files not shown
+4,555-4,80418 files

LLVM/project f9ad322clang/docs ClangOffloadBundler.md ClangRepl.md

[docs] Finish MyST migration for selected docs
DeltaFile
+88-137clang/docs/ClangOffloadBundler.md
+15-18clang/docs/ClangRepl.md
+14-14clang/docs/LibASTImporter.md
+11-11clang/docs/RAVFrontendAction.md
+4-4clang/docs/InternalsManual.md
+3-3clang/docs/LibASTMatchersTutorial.md
+135-1877 files not shown
+145-20413 files

LLVM/project 4372295clang/docs InternalsManual.md

[docs] Clean up migrated Clang InternalsManual markup

Replace migrated blockquote markup in InternalsManual.md with MyST definition lists where the surrounding text is semantically a term-and-definition list.
DeltaFile
+108-108clang/docs/InternalsManual.md
+108-1081 files

LLVM/project 7e13da9clang/docs InternalsManual.md InternalsManual.rst

[docs] Rename selected Clang docs to Markdown

Rename 18 Clang documentation files from .rst to .md. The clang-format generated docs are split into users/rnk/clang-format-md-rename and users/rnk/clang-format-md-write for separate review.
DeltaFile
+3,941-0clang/docs/InternalsManual.md
+0-3,941clang/docs/InternalsManual.rst
+0-658clang/docs/ClangRepl.rst
+658-0clang/docs/ClangRepl.md
+613-0clang/docs/LibASTImporter.md
+0-613clang/docs/LibASTImporter.rst
+5,212-5,21230 files not shown
+9,110-9,11036 files

LLVM/project c2adde4llvm/include/llvm/Analysis LoopInfo.h, llvm/lib/Analysis LoopInfo.cpp

[LoopInfo][LCSSA] Handle token-like values (#210816)

Token-like values have many (but not all) of the same restrictions as
regular token values.
They do however inherit the restriction on being placed in PHI and thus
they need to be
treated like regular tokens in LCSSA.

AI Disclosure: Written by GPT 5.6 - flagged during GPT 5.6 review of
#151062 rebase.
DeltaFile
+24-0llvm/test/Transforms/LCSSA/token-like-live-out.ll
+7-7llvm/lib/Analysis/LoopInfo.cpp
+4-3llvm/include/llvm/Analysis/LoopInfo.h
+4-3llvm/lib/Transforms/Utils/LCSSA.cpp
+39-134 files

LLVM/project e8f7d45clang/include/clang/CIR/Dialect/IR CIRTypes.td, clang/lib/CIR/CodeGen CIRGenRecordLayoutBuilder.cpp CIRGenExprConstant.cpp

[CIR] Refactor lowerUnion so unions get laid out consistently (#210709)

Perennial and a few other examples I came up with showed some situations
where we were bad at layout in CIR for unions. Sometimes we'd omit the
required fields, or miscalculate the storage type, or just not constant
init it correctly. This is mostly because we copy/pasted our
implementation from classic-codegen, but have different invariants.

This patch consistently adds ALL fields to the cir::UnionType, so we
always represent with all, which is an assumption we make elsewhere.

The lowerUnion function is significantly rewritten as the previous
version had a lot of interdepencies between loop runs. This patch
separates it out in a way that has less cyclic complexity which will
hopefully be more readable with minor/little compile-time impact.

This maintains the non-virtual-base functionality as well, though it
does it by collecting the fields like we do for the normal union case,
then just erases them. This greatly simplifies the calculation of

    [3 lines not shown]
DeltaFile
+137-0clang/test/CIR/CodeGen/unions-with-zero-init.cpp
+40-50clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
+5-1clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+1-1clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp
+2-0clang/include/clang/CIR/Dialect/IR/CIRTypes.td
+185-525 files

LLVM/project 770d4b7llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlan.h, llvm/test/Transforms/LoopVectorize/VPlan vplan-based-stride-mv.ll

Expand directly to VPlan, drop VPExpandStridePredicatesRecipe
DeltaFile
+35-34llvm/test/Transforms/LoopVectorize/VPlan/vplan-based-stride-mv.ll
+22-28llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+0-42llvm/lib/Transforms/Vectorize/VPlan.h
+0-7llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+0-6llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+2-3llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+59-1201 files not shown
+60-1237 files

LLVM/project 6e1e9a0llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlanUtils.cpp, llvm/test/Transforms/LoopVectorize/VPlan vplan-based-stride-mv.ll

Address code-review comments
DeltaFile
+4-114llvm/test/Transforms/LoopVectorize/VPlan/vplan-based-stride-mv.ll
+7-8llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+3-5llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+14-1273 files

LLVM/project e6cde20lldb/source/Commands CommandObjectScripting.cpp

[lldb/script] Remove verbose comments following c4962f5721a3 (NFC) (#210827)

This removes verbose comments from c4962f5721a3 following a post-merge
comment.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
DeltaFile
+0-9lldb/source/Commands/CommandObjectScripting.cpp
+0-91 files

LLVM/project 13d822cclang/lib/CIR/CodeGen CIRGenExprConstant.cpp, clang/test/CIR/CodeGen bitfield-init-values.c

[CIR] Fix how we lower bitfield constants (#210791)

My patch to change the type of a const missed that there is a difference
between how we were representing a bitfield (always as an int) in the
constant, and in the struct(as a byte array).

This patch makes sure we correctly match the storage type, and just
requires packing/unpacking arrays when we store it.
DeltaFile
+66-12clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp
+43-13clang/test/CIR/CodeGen/bitfield-init-values.c
+109-252 files

LLVM/project b4000b6clang/lib/CIR/CodeGen CIRGenBuiltinX86.cpp, clang/test/CIR/CodeGenBuiltins/X86 avx-shuffle-builtins.c avx-builtins.c

[CIR] X86 vperm2f128 builtin implementation (#208851)

This PR implements X86 VPerm2f128 intrinsics and its tests.

Addresses #167765
DeltaFile
+181-0clang/test/CIR/CodeGenBuiltins/X86/avx-shuffle-builtins.c
+44-4clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+36-0clang/test/CIR/CodeGenBuiltins/X86/avx-builtins.c
+261-43 files

LLVM/project e41ac74llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 minmax-copyables-split-node.ll

[SLP]Fix crash in isExpandedBinOp on split-node scalars

A split node's Scalars mix two unrelated operations under one
synthetic main/alt op and never populate CopyableElements, so
querying isExpandedBinOp on one of its scalars can make
getMatchingMainOpOrAltOp return nullptr, causing the crash.

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/210828
DeltaFile
+74-0llvm/test/Transforms/SLPVectorizer/X86/minmax-copyables-split-node.ll
+5-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+79-22 files

LLVM/project cdc31cfllvm/lib/DWARFLinker/Parallel DependencyTracker.cpp DependencyTracker.h, llvm/test/tools/dsymutil/X86/DWARFLinkerParallel odr-deterministic-nested-type.test

[DWARFLinker] Fix RefTypeName crash and type-table non-determinism (#209033)

The parallel linker computes DIE placement (artificial type unit vs
plain DWARF) concurrently across compile units.

1. updateDependenciesCompleteness checked the placement of the enclosing
root type (getRootForSpecifiedEntry) instead of the actual referenced
DIE. A nested type can be demoted to plain DWARF while its root stays in
the type table, leaving a type-unit DIE that references a plain DIE and
tripping the RefTypeName assertion in
DIEAttributeCloner::cloneDieRefAttr. Carry the actual referenced DIE on
the worklist item and check its placement.

2. The completeness dependency set was recorded as a side effect of the
concurrent marking traversal, which short-circuits on already-marked
DIEs (isAlreadyMarked) before maybeAddReferencedRoots. When a shared
cross-CU DIE was already marked by a racing CU, the current referencing
root's outgoing dependencies were dropped, so the demotion fixpoint
missed demotions and whole type subtrees were left in the artificial

    [7 lines not shown]
DeltaFile
+298-0llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/odr-deterministic-nested-type.test
+77-25llvm/lib/DWARFLinker/Parallel/DependencyTracker.cpp
+43-11llvm/lib/DWARFLinker/Parallel/DependencyTracker.h
+418-363 files

LLVM/project 4c88bd7llvm/lib/Transforms/Vectorize LoadStoreVectorizer.cpp, llvm/test/Transforms/LoadStoreVectorizer external-state-pointer.ll

[LoadStoreVectorizer] Avoid vectorizing pointers with external state (#209909)

LLVM pointers with external state must be loaded and stored using their
pointer type so that out-of-band state is transferred. I noticed that
the LangRef explicitly prohibits replacing such accesses with integer or
byte accesses:
https://llvm.org/docs/LangRef.html#pointers-with-external-state

> When a pointer type has external state, all roundtrips via memory must
be performed as loads and stores of the correct type since stores of
other types may not propagate the external data. Therefore it is not
legal to convert an existing load/store (or a llvm.memcpy / llvm.memmove
intrinsic) of pointer types with external state to a load/store of an
integer or byte type with the same bitwidth, as that may drop the
external state.

The LoadStoreVectorizer could combine an external-state pointer access
with an adjacent same-sized access, replacing them with an integer
vector load/store and `inttoptr`/`ptrtoint`.

    [9 lines not shown]
DeltaFile
+48-0llvm/test/Transforms/LoadStoreVectorizer/external-state-pointer.ll
+6-0llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
+54-02 files

LLVM/project 95649d6clang/lib/CIR/CodeGen CIRGenBuiltinNVPTX.cpp CIRGenBuiltin.cpp, clang/test/CIR/CodeGenCUDA builtins-nvvm-atomic.cu

[CIR][CUDA] Add support for NVVM binary atomic builtins (#210534)

Adds codegen support for the following NVVM binary atomic builtins: add,
sub, and, or, xor, min, umin, max and max.

These are lowered to the corresponding CIR `cir.atomic.fetch` operations
and subsequently lowered to LLVM `atomicrmw` instructions.
DeltaFile
+229-0clang/test/CIR/CodeGenCUDA/builtins-nvvm-atomic.cu
+44-44clang/lib/CIR/CodeGen/CIRGenBuiltinNVPTX.cpp
+9-8clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+6-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+288-524 files

LLVM/project 3d0f18blldb/source/Commands CommandObjectScripting.cpp

[lldb/script] Only auto-open the generator template in an editor when interactive (#210808)

`scripting extension generate` always launched the external editor after
writing the template to disk, which is fine when a user types the
command at the prompt but is undesirable when the command runs from the
test suite, a headless driver, or a script -- each invocation spawns an
editor that nobody sees.

Extend `--open-editor` (`-e`) so that the default (`eLazyBoolCalculate`)
now dispatches on `CommandReturnObject::GetInteractive()`, which
`SBCommandInterpreter::HandleCommand` explicitly clears. That's the
accurate signal even when the process' stdin is a TTY inherited from the
parent (e.g. `lldb-dotest` invoked from a terminal). `--open-editor yes`
and `--open-editor no` still force the behavior explicitly.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
DeltaFile
+23-4lldb/source/Commands/CommandObjectScripting.cpp
+23-41 files

LLVM/project 4479f33clang/lib/Basic/Targets TCE.h

[clang][TCE] Fix ordering of OpenCL address space mappings (#210244)

opencl_global_device and opencl_global_host are defined after
opencl_generic in LangAS, but commit
8d27be8dbaffce0519ac41173d51923fc2524b1b inserted them before
opencl_generic in the TCE address space map.

Fix the order to restore the intended mappings.
DeltaFile
+2-2clang/lib/Basic/Targets/TCE.h
+2-21 files

LLVM/project 66af87flibc/src/stdlib/linux realpath.cpp CMakeLists.txt, libc/test/src/stdlib realpath_test.cpp

[libc][realpath] Validate path components (#209370)

This PR updates `realpath` to validate paths and return `ENOTDIR` or
`ENOENT` according to
https://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html.
DeltaFile
+49-0libc/test/src/stdlib/realpath_test.cpp
+34-0libc/src/stdlib/linux/realpath.cpp
+5-0libc/src/stdlib/linux/CMakeLists.txt
+88-03 files

LLVM/project e92e178clang/include/clang/CIR LoweringHelpers.h, clang/lib/CIR/Lowering LoweringHelpers.cpp

[CIR] Fixup conversion of const unions/structs of unions (#210146)

Now that we represent a union as all of the fields, it is possible for
the non-storage type to be initialized, so the fact that we were
lowering the types as storage in 1 way for the constant type, but
filling it with our actual value was wrong.

This patch makes sure we create a literal struct type for LLVM for union
types where they don't match, which generally matches the OGCG
implementation/output.

I've also generalized the work for the FAM to do this conversion, and
moved it to LoweringHelpers, so that our ConstantRecord lowering can use
it too.

This patch fixes up a couple uses of std::string initializers where they
fit in the SSO.

Note: I was assisted in this by Claude Opus. I did plenty of self-review
on this as it was being generated, and a post-review, but hopefully I
didn't miss anything.
DeltaFile
+174-9clang/lib/CIR/Lowering/LoweringHelpers.cpp
+5-78clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+23-2clang/test/CIR/CodeGen/record-with-padded-union.cpp
+13-0clang/include/clang/CIR/LoweringHelpers.h
+3-4clang/test/CIR/CodeGen/anonymous-nested-init.c
+218-935 files

LLVM/project f107303llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer Scheduler.h, llvm/lib/Transforms/Vectorize/SandboxVectorizer Scheduler.cpp

[SandboxVec][Scheduler] Use SchedulingPoint for pointing to scheduling front (#208373)

The scheduling point is the last instruction scheduled. If this is the
first time scheduling and we are scheduling top-down then we may need to
point before the beginning of the basic block. This is why a
BasicBlock::iterator does not work well here.

Until now we were using the first top-most instruction for this, which
is inconsistent.
DeltaFile
+110-4llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Scheduler.h
+88-0llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp
+24-6llvm/lib/Transforms/Vectorize/SandboxVectorizer/Scheduler.cpp
+222-103 files

LLVM/project 596767aclang/lib/CodeGen CodeGenModule.cpp, clang/lib/CodeGen/Targets PPC.cpp

clang: Emit "long-double-type" module flag generically

Move emission of the "long-double-type" module flag out of PowerPC
and into generic code, so it describes the long double format for all
targets.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+26-0clang/lib/CodeGen/CodeGenModule.cpp
+23-0clang/test/CodeGen/long-double-type-module-flag.c
+0-23clang/lib/CodeGen/Targets/PPC.cpp
+0-17clang/test/CodeGen/ppc64-long-double-type-attr.c
+49-404 files

LLVM/project 499daecllvm/docs LangRef.md, llvm/include/llvm/Support CodeGen.h

IR: Introduce "float-abi" module flag

This is intended to eliminate the FloatABIType TargetOptions field.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+37-0llvm/test/Verifier/module-flags-float-abi.ll
+31-0llvm/docs/LangRef.md
+16-12llvm/lib/IR/AutoUpgrade.cpp
+28-0llvm/test/Linker/module-flags-float-abi.ll
+25-0llvm/include/llvm/Support/CodeGen.h
+16-0llvm/test/Bitcode/upgrade-ppc-float-abi.ll
+153-124 files not shown
+191-1210 files

LLVM/project 89fa148llvm/docs LangRef.md, llvm/lib/IR Verifier.cpp

IR: Accept x86_fp80 as a long-double-type value

Prepare to emit long-double-type for all targets.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+6-0llvm/test/Assembler/module-flags-long-double-type.ll
+3-1llvm/lib/IR/Verifier.cpp
+3-0llvm/docs/LangRef.md
+12-13 files

LLVM/project ba29870llvm/docs LangRef.md, llvm/lib/IR AutoUpgrade.cpp

PowerPC: Rename "float-abi" module flag to "long-double-type"

PPC was emitting a "float-abi" module flag for indicating the type of long
double. The "float ABI" naming is already widely taken by soft vs. hard
float controls (e.g., the clang flag is called -mfloat-abi), so this shouldn't
have taken it. This should also not be PPC specific; x86 has the same problem.
Rename the flag to the more specific long-double-type, and add appropriate
verification and documentation (which was also missing). Also changes the value
names to match the IR type names.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+45-0llvm/test/Bitcode/upgrade-ppc-float-abi.ll
+28-11llvm/test/CodeGen/PowerPC/gnu-attribute.ll
+37-0llvm/test/Verifier/module-flags-long-double-type.ll
+31-0llvm/test/Linker/module-flags-long-double-type.ll
+30-0llvm/docs/LangRef.md
+20-0llvm/lib/IR/AutoUpgrade.cpp
+191-116 files not shown
+254-4212 files

LLVM/project 5f2d043llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp, llvm/test/CodeGen/AArch64 vecreduce-mul-constant-fold.ll

[SelectionDAG] Fold VECREDUCE_MUL of a constant BUILD_VECTOR (#210126)

Follows up on #207560 (VECREDUCE_ADD).
Adds constant folding for `ISD::VECREDUCE_MUL` in
`SelectionDAG::FoldConstantArithmetic` when the input is a
`BUILD_VECTOR` of integer constants. 

Fixes #209110
DeltaFile
+73-0llvm/test/CodeGen/AArch64/vecreduce-mul-constant-fold.ll
+2-1llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+75-12 files