LLVM/project 20c1375llvm/lib/CodeGen MachineCombiner.cpp

Revert unrelated formatting.
DeltaFile
+7-9llvm/lib/CodeGen/MachineCombiner.cpp
+7-91 files

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

IR: Validate and document the "target-abi" module flag

The "target-abi" module flag is already emitted by clang for RISC-V and
consumed by the RISC-V and LoongArch backends, but it was neither validated
by the IR Verifier nor documented in LangRef. Add a Verifier check that the
flag's value operand is a non-empty string.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+25-0llvm/test/Verifier/module-flags-target-abi.ll
+18-0llvm/docs/LangRef.md
+13-0llvm/test/Assembler/module-flags-target-abi.ll
+6-0llvm/lib/IR/Verifier.cpp
+62-04 files

LLVM/project 24d114cllvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU promote-alloca-mixed-width-access.ll

[AMDGPU] PromoteAlloca: split scalar accesses that span several elements

promoteAllocaToVector already splits a *vector* access across several
elements when it is a multiple of the element size, but a *scalar* access
had to be bitcastable to the element type, so an i64 load from an alloca
promoted to <8 x i32> was rejected as "not a supported access type" and
the object stayed in scratch.

Accept a scalar access that is a whole multiple of the element size and
route it through the existing subvector path, which already builds the
value from consecutive elements and bitcasts. Accesses with padding are
still rejected, since splitting those would put the pieces at the wrong
offsets, as are non-integer non-float types.
DeltaFile
+78-0llvm/test/CodeGen/AMDGPU/promote-alloca-mixed-width-access.ll
+28-4llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+106-42 files

LLVM/project aec0ffcllvm/test/CodeGen/AMDGPU promote-alloca-mixed-width-access.ll

Testing updates per PR feedback, add some new test cases
DeltaFile
+87-6llvm/test/CodeGen/AMDGPU/promote-alloca-mixed-width-access.ll
+87-61 files

LLVM/project 59e760dllvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU eliminate-frame-index-select.ll promote-alloca-homogeneous-struct.ll

[AMDGPU] PromoteAlloca: flatten homogeneous structs to vectors

getVectorTypeForAlloca() peeled nested ArrayType and one inner
FixedVectorType, but stopped at any StructType. An alloca of an array of
structs was therefore rejected with "Cannot convert type to vector" and
fell back to scratch, even when the struct was a trivial wrapper around a
scalar.

Peel structs too, but only when every field has the same type and the
struct has no padding, so flattened elements keep the byte offsets the
surrounding index arithmetic assumes. Structs with differing field types
or with padding are left alone.
DeltaFile
+59-0llvm/test/CodeGen/AMDGPU/promote-alloca-homogeneous-struct.ll
+35-6llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+6-1llvm/test/CodeGen/AMDGPU/eliminate-frame-index-select.ll
+100-73 files

LLVM/project 3641c9allvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU eliminate-frame-index-select.ll promote-alloca-homogeneous-struct.ll

Simplify logic via suggestions from PR feedback. Add additional test cases, make tests a bit more complex so they don't fold into simple store of constant
DeltaFile
+101-8llvm/test/CodeGen/AMDGPU/promote-alloca-homogeneous-struct.ll
+4-16llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+4-4llvm/test/CodeGen/AMDGPU/eliminate-frame-index-select.ll
+109-283 files

LLVM/project 07a2700llvm/test/CodeGen/AMDGPU promote-alloca-homogeneous-struct.ll

Update script version and triple format per PR feedback
DeltaFile
+2-2llvm/test/CodeGen/AMDGPU/promote-alloca-homogeneous-struct.ll
+2-21 files

LLVM/project 82732fallvm/cmake/modules AddSphinxTarget.cmake

[docs] Fix default Sphinx worker count (#217429)

I renamed the variable at the last minute, and the search and replace
didn't catch all instances. Follow-up to #217161 /
0e6f9b26868c37cfb27fdc99af0524ed78e1dfd8.
DeltaFile
+1-1llvm/cmake/modules/AddSphinxTarget.cmake
+1-11 files

LLVM/project b8bb275llvm/include/llvm/CodeGen MachineCombiner.h

Remove getRequiredProperties from MachineCombinerPass

This isn't present in the "Legacy" PM
DeltaFile
+0-4llvm/include/llvm/CodeGen/MachineCombiner.h
+0-41 files

LLVM/project 1949096llvm/include/llvm/Target TargetMachine.h, llvm/lib/Target TargetMachine.cpp

CodeGen: Consolidate target-abi validation

LoongArch and RISCV both implemented an error if the
"target-abi" module flag was inconsistent with the -target-abi
option flag. Consolidate these into one place, and change
from a fatal error to a nonfatal context error.

One untested incidental behavior change is for garbage names.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+15-0llvm/lib/Target/TargetMachine.cpp
+1-10llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
+1-10llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
+5-0llvm/include/llvm/Target/TargetMachine.h
+2-2llvm/test/CodeGen/RISCV/module-target-abi2.ll
+2-2llvm/test/CodeGen/RISCV/module-target-abi.ll
+26-246 files

LLVM/project a00f57bllvm/lib/Target/X86 X86CodeGenPassBuilder.cpp

Refactor addILPOpts to simplify conditionals

Remove extraneous braces.
DeltaFile
+1-2llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
+1-21 files

LLVM/project 9ba265clld/test/MachO eh-frame.s, lld/test/MachO/Inputs eh-frame-x86_64-r.o eh-frame-arm64-r.o

[LLD][MachO] Remove eh-frame test binaries (#217107)

Use `update_test_body.py` to generate `.yaml` files that can be
converted to `.o` files to be used in the test. This allows us to delete
the `eh-frame-{arm64,x86_64}-r.o` binaries, and makes it much easier to
update the data (note that it needs to run on a mac). I check the output
of `obj2yaml` and saw the only difference from the inline `.yaml` files
are the version numbers.
DeltaFile
+819-12lld/test/MachO/eh-frame.s
+0-0lld/test/MachO/Inputs/eh-frame-x86_64-r.o
+0-0lld/test/MachO/Inputs/eh-frame-arm64-r.o
+819-123 files

LLVM/project 0e6f9b2llvm/cmake/modules AddSphinxTarget.cmake, llvm/docs CMake.md

[docs] Parallelize Sphinx builds by default (#217161)

Sphinx doc builds are slow now that we're using the furo theme. We can
speed them up by using the sphinx-build -j flag. This adds and documents
two new cmake options:

1. `LLVM_PARALLEL_SPHINX_JOBS`: Controls the sphinx-build ninja pool
   depth, just like LLVM_PARALLEL_LINK_JOBS does.
2. `LLVM_SPHINX_BUILD_JOBS`: Controls the sphinx-build -j flag, which
   controls internal parallelism. Defaults to nproc+1/2.

This is imperfect because we may oversubscribe the CPU with tasks, but
doc build actions are usually on the critical path at the end of the
build, or they are in large, non-incremental batch build actions that
build all targets. This approximate approach seems reasonable.

3-run hyperfine comparison for clean docs-llvm-html builds, removing the
html output and doctree cache before each timing run:


    [5 lines not shown]
DeltaFile
+35-0llvm/cmake/modules/AddSphinxTarget.cmake
+11-4llvm/docs/CMake.md
+46-42 files

LLVM/project 0674eecllvm/test/Transforms/SLPVectorizer/X86 zext-or-nibble-reduction.ll

[SLP][NFC]Add an extra test for shifted zext after logical op, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/217411
DeltaFile
+84-0llvm/test/Transforms/SLPVectorizer/X86/zext-or-nibble-reduction.ll
+84-01 files

LLVM/project 18d92bcflang/test/Lower/OpenMP metadirective-implementation.f90

Restore OpenMP 5.0 metadirective coverage

Restore the test invocation removed when the 5.2 coverage was added. The
existing pre-5.2 fallback spelling remains valid at OpenMP 5.0.
DeltaFile
+2-0flang/test/Lower/OpenMP/metadirective-implementation.f90
+2-01 files

LLVM/project 43c2388flang/include/flang/Semantics openmp-utils.h, flang/lib/Lower/OpenMP OpenMP.cpp

Validate metadirective replacement nesting

Track each reachable replacement with the effective enclosing directive
path that selects it. Validate selected directives and nested constructs
against those correlated paths instead of flattening replacements.

Reuse direct ORDERED, SCAN, BARRIER, worksharing, SIMD, MASTER, and
cancellation checks for selected variants, including parent-clause
restrictions and sink-vector lengths.

Move barrier rejection fully into semantics and add focused coverage for
valid and invalid replacement paths.
DeltaFile
+472-151flang/lib/Semantics/check-omp-structure.cpp
+241-0flang/test/Semantics/OpenMP/metadirective-nesting.f90
+64-1flang/lib/Semantics/check-omp-variant.cpp
+50-2flang/lib/Semantics/check-omp-structure.h
+1-21flang/lib/Lower/OpenMP/OpenMP.cpp
+4-0flang/include/flang/Semantics/openmp-utils.h
+832-1752 files not shown
+834-1778 files

LLVM/project 34ceb8eflang/include/flang/Optimizer/Builder/Runtime Assign.h, flang/lib/Optimizer/Builder/Runtime Assign.cpp

[flang] - Call _FortranAAssignSimple instead of _FortranAAssign for intrinsic-type array assignments.

This patch adds support for calling _FortranAAssignSimple, a faster-path for array assignments.
`_FortranAAssignSimple` is called when ALL the following conditions are true:
1. Intrinsic element type (not derived type)
2. Matching ranks (no scalar-to-array broadcasting)
3. Non-volatile
4. Not polymorphic
5. Not explicit-length character
6. Not temporary LHS

Otherwise, uses `_FortranAAssign` (or specialized variants like `_FortranAAssignPolymorphic`, `_FortranAAssignExplicitLengthCharacter`).

This is a (perhaps final) part of the fix for https://github.com/llvm/llvm-project/issues/203915
DeltaFile
+287-0flang/test/HLFIR/assign-simple-routing.fir
+46-4flang/lib/Optimizer/HLFIR/Transforms/ConvertToFIR.cpp
+19-13flang/lib/Optimizer/OpenMP/LowerWorkdistribute.cpp
+13-0flang/lib/Optimizer/Builder/Runtime/Assign.cpp
+12-0flang/include/flang/Optimizer/Builder/Runtime/Assign.h
+2-2flang/test/HLFIR/assign-codegen.fir
+379-192 files not shown
+381-218 files

LLVM/project 4001e71flang-rt/unittests/Runtime Assign.cpp

Add more tests per Michael Klemms request
DeltaFile
+164-0flang-rt/unittests/Runtime/Assign.cpp
+164-01 files

LLVM/project 5ce4692libc/shared/math fminimum_numf128.h, libc/src/__support/math fminimum_numf128.h

fminimum_numf128
DeltaFile
+4-7libc/src/__support/math/fminimum_numf128.h
+0-6libc/shared/math/fminimum_numf128.h
+3-3libc/test/shared/shared_math_constexpr_test.cpp
+5-1libc/src/math/generic/fminimum_numf128.cpp
+5-0libc/test/src/math/smoke/fminimum_numf128_test.cpp
+5-0libc/src/math/fminimum_numf128.h
+22-1720 files not shown
+47-3026 files

LLVM/project 7372d4elibc/shared/math fmaximum_numf128.h, libc/src/__support/math fmaximum_numf128.h

fmaximum_numf128
DeltaFile
+4-7libc/src/__support/math/fmaximum_numf128.h
+0-6libc/shared/math/fmaximum_numf128.h
+3-3libc/test/shared/shared_math_constexpr_test.cpp
+5-1libc/src/math/generic/fmaximum_numf128.cpp
+5-0libc/test/src/math/smoke/fmaximum_numf128_test.cpp
+5-0libc/src/math/fmaximum_numf128.h
+22-1720 files not shown
+47-3026 files

LLVM/project 476cfc4libc/test/src/math/smoke FMinimumTest.h

nit
DeltaFile
+1-1libc/test/src/math/smoke/FMinimumTest.h
+1-11 files

LLVM/project 9932f19compiler-rt/lib/profile InstrProfilingMerge.c

[profile] hoist length check before use of pointer (#217109)

If a truncated profile is passed into this endpoint (say, 1 byte), we
unconditionally do `((__llvm_profile_header
*)ProfileData)->BinaryIdsSize`, which reaches outside of the `char`
array passed to this function.

Hoisting the check prevents the out-of-bounds read.
DeltaFile
+3-3compiler-rt/lib/profile/InstrProfilingMerge.c
+3-31 files

LLVM/project 2903320llvm/cmake/modules AddSphinxTarget.cmake, llvm/docs CMake.md

Rename internal job option
DeltaFile
+5-6llvm/docs/CMake.md
+5-5llvm/cmake/modules/AddSphinxTarget.cmake
+10-112 files

LLVM/project 512af05llvm/test/CodeGen/AMDGPU promote-alloca-mixed-width-access.ll

Testing updates per PR feedback, add some new test cases
DeltaFile
+87-6llvm/test/CodeGen/AMDGPU/promote-alloca-mixed-width-access.ll
+87-61 files

LLVM/project a58a80allvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU promote-alloca-mixed-width-access.ll

[AMDGPU] PromoteAlloca: split scalar accesses that span several elements

promoteAllocaToVector already splits a *vector* access across several
elements when it is a multiple of the element size, but a *scalar* access
had to be bitcastable to the element type, so an i64 load from an alloca
promoted to <8 x i32> was rejected as "not a supported access type" and
the object stayed in scratch.

Accept a scalar access that is a whole multiple of the element size and
route it through the existing subvector path, which already builds the
value from consecutive elements and bitcasts. Accesses with padding are
still rejected, since splitting those would put the pieces at the wrong
offsets, as are non-integer non-float types.
DeltaFile
+78-0llvm/test/CodeGen/AMDGPU/promote-alloca-mixed-width-access.ll
+28-4llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+106-42 files

LLVM/project b6641eallvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU eliminate-frame-index-select.ll promote-alloca-homogeneous-struct.ll

[AMDGPU] PromoteAlloca: flatten homogeneous structs to vectors

getVectorTypeForAlloca() peeled nested ArrayType and one inner
FixedVectorType, but stopped at any StructType. An alloca of an array of
structs was therefore rejected with "Cannot convert type to vector" and
fell back to scratch, even when the struct was a trivial wrapper around a
scalar.

Peel structs too, but only when every field has the same type and the
struct has no padding, so flattened elements keep the byte offsets the
surrounding index arithmetic assumes. Structs with differing field types
or with padding are left alone.
DeltaFile
+59-0llvm/test/CodeGen/AMDGPU/promote-alloca-homogeneous-struct.ll
+35-6llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+6-1llvm/test/CodeGen/AMDGPU/eliminate-frame-index-select.ll
+100-73 files

LLVM/project a47caaellvm/test/CodeGen/AMDGPU promote-alloca-homogeneous-struct.ll

Update script version and triple format per PR feedback
DeltaFile
+2-2llvm/test/CodeGen/AMDGPU/promote-alloca-homogeneous-struct.ll
+2-21 files

LLVM/project bfd2e58llvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU eliminate-frame-index-select.ll promote-alloca-homogeneous-struct.ll

Simplify logic via suggestions from PR feedback. Add additional test cases, make tests a bit more complex so they don't fold into simple store of constant
DeltaFile
+101-8llvm/test/CodeGen/AMDGPU/promote-alloca-homogeneous-struct.ll
+4-16llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+4-4llvm/test/CodeGen/AMDGPU/eliminate-frame-index-select.ll
+109-283 files

LLVM/project 159dcbfllvm/test/CodeGen/X86 fp-int-fp-cvt.ll

[X86] Add regression test coverage for #217355 (#217387)
DeltaFile
+19-0llvm/test/CodeGen/X86/fp-int-fp-cvt.ll
+19-01 files

LLVM/project 5182583libc/test/src/math/smoke FMaximumTest.h

nit:cast
DeltaFile
+1-1libc/test/src/math/smoke/FMaximumTest.h
+1-11 files