LLVM/project 93f8004 — clang/unittests/CodeGen QualTypeMapperTest.cpp, llvm/include/llvm/ABI Types.h

[ABI][AARCH64][NFC] Make SveCount a unique type (#245767)

The LLVM ABI library previously modeled SveCount (the AArch64
predicate-as-counter type) as a vector with a special kind to
distinguish it. Upon further reflection, this seems to have been a bad
choice as this type has almost no overlap with other vector types apart
from the fact that it occupies a predicate register.

This change separates SveCount as a separate type in the ABI library.
The classification and the LLVM IR type to which it is mapped remain
unchanged.

Assisted-by: Cursor / various models
DeltaFile
+23-15llvm/include/llvm/ABI/Types.h
+13-9clang/unittests/CodeGen/QualTypeMapperTest.cpp
+8-8llvm/unittests/ABI/TypesTest.cpp
+7-7llvm/lib/ABI/Targets/AArch64.cpp
+6-6llvm/unittests/ABI/AArch64TargetInfoTest.cpp
+2-4llvm/unittests/ABI/IRTypeMapperTest.cpp
+59-494 files not shown
+67-5510 files

LLVM/project 6c65461 — llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp, llvm/lib/Transforms/Vectorize SLPVectorizer.cpp

[SLP][AArch64]Fix spill cost of bundles hoisted above external users

The scheduler places a bundle above its scalar users in the block, but
the spill cost used the last bundle instruction and missed the calls in
between. The AArch64 keep-live cost also counts every 128-bit part of
wider vectors.

| Benchmark | Base (s) | Run 1, 2 passes | Confirm run, 2 iterations |
|---|---|---|---|
| 508.namd_r | 126.3 | -2.21% [-3.5..-0.9] | -2.14% [-3.7..-0.6] |
| 523.xalancbmk_r | 151.4 | -1.39% [-1.8..-1.0] | -2.50% [-3.1..-1.9] |
| 722.palm_r | 194.3 | +0.78% [-0.7..+2.3] | +0.30% [-0.7..+1.3] |
| 710.omnetpp_r | 124.4 | +0.42% [-0.1..+1.0] | -0.22% [-1.5..+1.1] |
| 777.zstd_r | 212.0 | +0.40% [-0.0..+0.8] | -0.21% [-0.7..+0.3] |

Assisted-by: Cursor

Pull-request: https://github.com/llvm/llvm-project/pull/241937
Reviewers: RKSimon, bababuck, john-brawn-arm
Reviewed-by: bababuck, john-brawn-arm
DeltaFile
+179-40llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+86-59llvm/test/Transforms/SLPVectorizer/AArch64/spillcost-hoisted-external-user.ll
+9-4llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+274-1033 files

LLVM/project 941f0a5 — clang/test/OpenMP target_teams_generic_loop_codegen_as_parallel_for.cpp nvptx_target_teams_distribute_parallel_for_simd_codegen.cpp

[Clang][OpenMP] Fix static,1 inner loop bound (#239868)

The inner loop of a combined distribute parallel for compared its
iteration variable directly with .previous.ub., whose parameter type is
uintptr_t. This could widen a signed i32 iteration variable to i64 and
make the comparison unsigned.

Reuse the existing conversion of .previous.ub. to the loop upper-bound
type when building the inner-loop condition. Update the affected OpenMP
codegen checks and add a focused test for signed and unsigned i32 loops.

Assisted by gpt-6.
DeltaFile
+52-52clang/test/OpenMP/nvptx_SPMD_codegen.cpp
+23-23clang/test/OpenMP/nvptx_target_teams_generic_loop_codegen.cpp
+23-23clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp
+30-0clang/test/OpenMP/distribute_parallel_for_bound_type_codegen.c
+9-9clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_simd_codegen.cpp
+6-6clang/test/OpenMP/target_teams_generic_loop_codegen_as_parallel_for.cpp
+143-1135 files not shown
+157-12611 files

LLVM/project cf3a679 — clang/lib/CodeGen CGOpenMPRuntime.cpp

Fix review comments
DeltaFile
+15-14clang/lib/CodeGen/CGOpenMPRuntime.cpp
+15-141 files

LLVM/project e2aaada — .github CODEOWNERS, mlir Maintainers.md

[mlir] Add @FedericoBruzzone as a co-maintainer of `Vector` (#245162)

Since starting his upstream involvement earlier this year, Federico has
become a very active and recognisable contributor to `Vector` (PRs,
reviews, RFCs).

From the beginning, Federico's `Vector` interests extended beyond his
own PRs. Indeed, he has reviewed 4 times as many PRs as he has submitted
himself! In addition, he has been putting a lot of effort into tracking
`Vector` activity on GitHub (there's been a lot). See e.g.:
  * https://github.com/llvm/llvm-project/issues/235708

This PR simply formalises what Fede has already been doing informally.
DeltaFile
+7-7.github/CODEOWNERS
+1-1mlir/Maintainers.md
+8-82 files

LLVM/project f714c3e — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/CodeGen/AMDGPU memintrinsic-unroll.ll

Rebase

Created using spr 2.0.0-beta.1
DeltaFile
+4,870-4,906llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+11-7,563mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+3,141-3,182llvm/test/CodeGen/RISCV/clmul.ll
+1,775-1,779llvm/test/CodeGen/RISCV/wide-scalar-shift-by-byte-multiple-legalization.ll
+1,903-1,342llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+1,560-1,560llvm/test/CodeGen/RISCV/nontemporal.ll
+13,260-20,3325,015 files not shown
+193,195-130,6235,021 files

LLVM/project 2efa6fc — clang/test/OpenMP dims_modifier_codegen.cpp

Add codegen test
DeltaFile
+14,789-0clang/test/OpenMP/dims_modifier_codegen.cpp
+14,789-01 files

LLVM/project 312face — clang/lib/CodeGen CGOpenMPRuntime.h CGOpenMPRuntime.cpp

[Clang][OpenMP] Update OpenMP CodeGen to support dims modifier
DeltaFile
+240-165clang/lib/CodeGen/CGOpenMPRuntime.cpp
+14-12clang/lib/CodeGen/CGOpenMPRuntime.h
+254-1772 files

LLVM/project 4230df2 — mlir/docs/Dialects SPIR-V.md, mlir/lib/Target/SPIRV/Deserialization Deserializer.h DeserializeOps.cpp

[mlir][SPIR-V] Deserialize constant composites with OpUndef constituents (#245516)

spirv.Constant cannot hold undef values, so build such vectors, arrays
and structs with spirv.CompositeConstruct at each use
DeltaFile
+62-0mlir/test/Target/SPIRV/constant-composite-undef.spvasm
+52-3mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
+26-2mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp
+19-0mlir/lib/Target/SPIRV/Deserialization/DeserializeOps.cpp
+8-0mlir/lib/Target/SPIRV/Deserialization/Deserializer.h
+5-2mlir/docs/Dialects/SPIR-V.md
+172-76 files

LLVM/project 13c4e8b — mlir/include/mlir/Dialect/SPIRV/IR SPIRVMemoryOps.td, mlir/lib/Dialect/SPIRV/IR SPIRVCanonicalization.cpp MemoryOps.cpp

[mlir][SPIR-V] Support untyped pointers in Load and Store (#245255)
DeltaFile
+73-19mlir/lib/Dialect/SPIRV/IR/MemoryOps.cpp
+34-2mlir/test/Dialect/SPIRV/IR/memory-ops.mlir
+26-0mlir/test/Dialect/SPIRV/Transforms/canonicalize.mlir
+14-6mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMemoryOps.td
+11-0mlir/test/Target/SPIRV/untyped-pointers.mlir
+6-2mlir/lib/Dialect/SPIRV/IR/SPIRVCanonicalization.cpp
+164-291 files not shown
+165-297 files

LLVM/project 210cdd2 — mlir/docs SPIRVToLLVMDialectConversion.md, mlir/lib/Conversion/SPIRVToLLVM SPIRVToLLVM.cpp

[mlir][SPIR-V] Add SPIRVToLLVM conversion for PtrEqual and PtrNotEqual (#242826)

Use adaptor operands in IComparePattern because pointer operand types
change during conversion

Depends on https://github.com/llvm/llvm-project/pull/242824
DeltaFile
+19-0mlir/test/Conversion/SPIRVToLLVM/memory-ops-to-llvm.mlir
+5-0mlir/docs/SPIRVToLLVMDialectConversion.md
+3-1mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
+27-13 files

LLVM/project 6af75d4 — mlir/include/mlir/Dialect/SPIRV/IR SPIRVAttributes.td, mlir/lib/Dialect/SPIRV/IR SPIRVAttributes.cpp

[mlir][SPIR-V] Verify workgroup_size in entry_point_abi (#245972)

Shorter arrays crashed GPUToSPIRV when lowering gpu.block_dim
DeltaFile
+20-0mlir/lib/Dialect/SPIRV/IR/SPIRVAttributes.cpp
+14-0mlir/test/Dialect/SPIRV/IR/target-and-abi.mlir
+1-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.td
+35-03 files

LLVM/project bc893a6 — libc/benchmarks LibcMemoryBenchmark.cpp

context

Created using spr 1.3.7
DeltaFile
+1-1libc/benchmarks/LibcMemoryBenchmark.cpp
+1-11 files

LLVM/project 1bd4a02 — libc/benchmarks LibcMemoryBenchmark.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1-1libc/benchmarks/LibcMemoryBenchmark.cpp
+1-11 files

LLVM/project 12e3916 — clang/www c_dr_status.html

[C23][Clang] Correct a typo in the DR log; NFC (#246119)

Accidentally duplicated the title of issue 1003, oops!
DeltaFile
+1-1clang/www/c_dr_status.html
+1-11 files

LLVM/project d4d5c39 — libc/benchmarks LibcMemoryBenchmark.cpp

fix

Created using spr 1.3.7
DeltaFile
+1-1libc/benchmarks/LibcMemoryBenchmark.cpp
+1-11 files

LLVM/project 0b1eaef — libc/benchmarks LibcMemoryBenchmark.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1-1libc/benchmarks/LibcMemoryBenchmark.cpp
+1-11 files

LLVM/project 098e6b7 — llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 sve-setcc.ll

[AArch64] Fold cmpne of a predicated non-zero splat into an AND (#242813)

`performSetccMergeZeroCombine` already folds `cmpne(pg, sext(p), 0)` to
`and(pg, p)`. The SVE intrinsic form `svdup_z(p, C)`
(`DUP_MERGE_PASSTHRU`) and the IR form `select(p, splat(C), 0)` did not
match it, so the SVE -> NEON -> SVE predicate round trip from the issue
compiled to:

    mov    z0.b, p0/z, #-1
    ptrue  p0.b, vl16
    cmpne  p0.b, p0/z, z0.b, #0

The fold now also accepts a predicated dup or select of an integer
constant C != 0 with a zero passthru. These are non-zero exactly in the
lanes where `p` is active. Only the low bits of C are checked, because
the dup scalar is any-extended to i32. Output is now:

    ptrue  p1.b, vl16
    and    p0.b, p0/z, p0.b, p1.b

    [6 lines not shown]
DeltaFile
+108-0llvm/test/CodeGen/AArch64/sve-setcc.ll
+10-3llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+118-32 files

LLVM/project 74958e3 — llvm/lib/Analysis LoopAccessAnalysis.cpp

[LAA] Find no dependence between non-overlapping loop-invariant accesses

A loop-invariant access touches the same bytes in every iteration, so
two of them are independent iff they do not overlap. LAA proved that
only by showing one ends before the other begins, e.g. p + 4 <=u p + 8
for a and c below, which fails unless SCEV knows the addresses do not
wrap. Otherwise it reported an unknown dependence and gave up on the
loop, so a loop that updates three or more fields of a struct through a
pointer was not vectorized:

  struct trio { int a, b, c; };
  void acc3(struct trio *p, const int *x, int n) {
    for (int i = 0; i < n; i++) {
      p->a += x[i];
      p->b ^= x[i];
      p->c |= x[i];
    }
  }


    [13 lines not shown]
DeltaFile
+16-4llvm/lib/Analysis/LoopAccessAnalysis.cpp
+16-41 files

LLVM/project 1ee2064 — llvm/test/Analysis/LoopAccessAnalysis invariant-accesses-disjoint.ll

[LAA] Precommit tests for non-overlapping loop-invariant accesses (NFC)

Assisted-by: Claude Code
DeltaFile
+667-0llvm/test/Analysis/LoopAccessAnalysis/invariant-accesses-disjoint.ll
+667-01 files

LLVM/project 08608ac — compiler-rt/lib/sanitizer_common sanitizer_platform_interceptors.h, compiler-rt/test/msan uchar_c32.cpp uchar_c16.cpp

[MSan] [ASan] [TSan] Disable UTF conversion interceptors on Solaris and AIX (#246128)

https://github.com/llvm/llvm-project/pull/243270 added interceptors then
broke Solaris buildbots.

This PR disables the new interceptors on Solaris and AIX.

Assisted-by: Gemini
DeltaFile
+3-4compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+1-1compiler-rt/test/tsan/uchar_race.cpp
+1-1compiler-rt/test/sanitizer_common/TestCases/Posix/uchar_c32.cpp
+1-1compiler-rt/test/sanitizer_common/TestCases/Posix/uchar_c16.cpp
+1-1compiler-rt/test/msan/uchar_c32.cpp
+1-1compiler-rt/test/msan/uchar_c16.cpp
+8-92 files not shown
+10-118 files

LLVM/project 4112cb5 — clang/include/clang/CIR/Dialect/IR CIRTypes.td, clang/lib/CIR/Dialect/IR CIRTypes.cpp

[CIR] Add support for __SVCount (#245456)

This adds CIR codegen support for __SVCount, introducing a new type to
represent it. Calling convention for this type is not yet implemented.
That will be handled in a future change.

Assisted-by: Cursor / claude-opus-5.5
DeltaFile
+28-0clang/test/CIR/CodeGen/sve-count.c
+15-12clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+27-0clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+21-4clang/include/clang/CIR/Dialect/IR/CIRTypes.td
+17-0clang/unittests/CIR/VectorTypeABIAlignTest.cpp
+3-2clang/test/CIR/Bytecode/types.cir
+111-185 files not shown
+123-2311 files

LLVM/project 0dbf98e — lldb/source/Plugins/SymbolFile/DWARF DWARFASTParserClang.cpp, lldb/test/API/lang/cpp/subroutine-type-cycle Makefile TestSubroutineTypeCycle.py

[lldb] Don't crash when a function type cannot be built (#245153)

CreateFunctionType returns an invalid type when a return or parameter
type is still being resolved further up the stack. ParseSubroutine uses
the result unchecked and dereferences a null type:

```
Assertion failed: (!isNull() && "Cannot retrieve a NULL type pointer")
```

Report an error and return no type instead.

Assisted-by: Claude
DeltaFile
+65-0lldb/test/API/lang/cpp/subroutine-type-cycle/cycle.ll
+33-0lldb/test/API/lang/cpp/subroutine-type-cycle/TestSubroutineTypeCycle.py
+10-0lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+8-0lldb/test/API/lang/cpp/subroutine-type-cycle/Makefile
+116-04 files

LLVM/project 6d66eb4 — llvm/lib/ProfileData SampleProfReader.cpp, llvm/test/Transforms/SampleProfile remapper-reread-loaded-profile.ll

[SampleProf] Add flag to allow re-reading loaded profiles with remapper (#244798)

Add a temporary hidden option
`-sample-profile-allow-reread-loaded-profile` (default `false`) to
restore the pre-#230386 behavior during incremental reads with a
remapper; this flag is temporary and for performance testing.
DeltaFile
+22-7llvm/test/Transforms/SampleProfile/remapper-reread-loaded-profile.ll
+12-3llvm/lib/ProfileData/SampleProfReader.cpp
+34-102 files

LLVM/project 59b4b62 — llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 extractelt-bitcast-vxi1-wide-result.ll

[X86] Fix mask indexing in the extractelement(bitcast(<X x i1>)) fold (#240715)

`combineExtractVectorElt` folds `extract_element(bitcast(<X x i1>))`
into an `EXTRACT_SUBVECTOR` of the mask, but sizes and indexes the
subvector by the result width instead of the source element width. The
result of `EXTRACT_VECTOR_ELT` may be wider than the element (and
`PEXTRB`/`PEXTRW` always return i32), so the fold could select the wrong
mask bits or build an out-of-bounds `EXTRACT_SUBVECTOR`.

Use the source element width, bitcast back to the element type, and
any-extend (zero-extend for `PEXTRB`/`PEXTRW`) to the result type.

Fixes #240704

AI assistance: Claude Code and ChatGPT were used for triage, patch
development and editing; the author reviewed the change and takes
responsibility for it.
DeltaFile
+159-0llvm/test/CodeGen/X86/extractelt-bitcast-vxi1-wide-result.ll
+7-6llvm/lib/Target/X86/X86ISelLowering.cpp
+166-62 files

LLVM/project e51d186 — clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/Lowering gpu-func-signature.cir

[cir] Convert gpu.func and gpu.launch_func signatures with cir types (#245465)

In CIR + OpenACC, the OpenACC compute region will be converted and
outlined to a `gpu.func`. The CIR to LLVM conversion will handle the
body of the `gpu.func` fine but the signature will keep the CIR types.
This patch adds two patterns to be able to convert the types in the
signature as well.

---------

Co-authored-by: Erich Keane <ekeane at nvidia.com>
DeltaFile
+35-0clang/test/CIR/Lowering/gpu-func-signature.cir
+33-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+3-1clang/tools/cir-opt/cir-opt.cpp
+1-0clang/tools/cir-opt/CMakeLists.txt
+72-14 files

LLVM/project f09bfa9 — llvm/lib/Transforms/InstCombine CMakeLists.txt InstCombineSimplifyDemanded.cpp, llvm/utils/gn/secondary/llvm/lib/Transforms/InstCombine BUILD.gn

[InstCombine][NFC] Move SimplifyDemandedUseFPClass functions verbatim to InstCombineSimplifyDemandedFP.cpp
DeltaFile
+1,938-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemandedFP.cpp
+0-1,913llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+1-0llvm/utils/gn/secondary/llvm/lib/Transforms/InstCombine/BUILD.gn
+1-0llvm/lib/Transforms/InstCombine/CMakeLists.txt
+1,940-1,9134 files

LLVM/project ee4a797 — clang/include/clang/Basic HLSLIntrinsics.td, clang/lib/Headers/hlsl hlsl_compat_overloads.h

[Matrix] Implement matrix support for the `lerp` intrinsic (#243639)

Closes #184506.
 
This PR implements the matrix api for `lerp` and adds matrix codegen
tests and matrix sema tests. Matrix backend tests were not added because
no DirectX or SPIRV backend changes were made.
 
Assisted-by: Claude Opus 5.5
DeltaFile
+68-0clang/test/CodeGenHLSL/builtins/lerp_mat-overloads.hlsl
+40-0clang/test/CodeGenHLSL/builtins/lerp_mat.hlsl
+38-0clang/lib/Headers/hlsl/hlsl_compat_overloads.h
+29-4clang/test/SemaHLSL/BuiltIns/ternary-compat-overload-warnings.hlsl
+0-1clang/include/clang/Basic/HLSLIntrinsics.td
+175-55 files

LLVM/project 8d1a89e — lld/MachO Relocations.h InputFiles.cpp, lld/include/lld/Common Memory.h

[lld][MachO] Pool relocation storage & sort relocs in ascending address order (#245184)

Currently, each subsection grows its own `std::vector` of relocations,
resulting in a lot of small allocations during relocation parsing, which
is costly. This PR allocates one relocation array per input section, and
each subsection takes a `RelocsArray` slice of it.

Some linker passes still need to dynamically `emplace_back()` into the
`RelocsArray`; since the slices are contiguous, they cannot expand
in-place, so we switch the `RelocsArray` storage to a per-subsection
heap-allocated buffer as needed. This is a similar to how `SmallVector`
behaves.

Additionally, we sort the relocations in ascending address order,
matching the order that subsections are sorted in. This means that
iterating over the relocations in subsection order can now benefit more
from the hardware prefetcher. (Previously, each subsection's relocations
were sorted in descending address order, but that did not matter as much
since the allocations were fragmented anyway.) This ordering results in

    [3 lines not shown]
DeltaFile
+146-22lld/test/MachO/unsorted-relocations.yaml
+90-53lld/MachO/InputFiles.cpp
+75-0lld/MachO/Relocations.h
+16-10lld/include/lld/Common/Memory.h
+14-3lld/test/MachO/invalid/invalid-relocation-pcrel.yaml
+7-7lld/test/MachO/arm64-stubs.s
+348-9520 files not shown
+412-15626 files

LLVM/project caf98ca — llvm/lib/Analysis CMakeLists.txt ValueTracking.cpp, llvm/utils/gn/secondary/llvm/lib/Analysis BUILD.gn

[ValueTracking][NFC] Move computeKnownFPClass functions verbatim to ValueTrackingFP.cpp
DeltaFile
+1,954-0llvm/lib/Analysis/ValueTrackingFP.cpp
+0-1,903llvm/lib/Analysis/ValueTracking.cpp
+1-0llvm/utils/gn/secondary/llvm/lib/Analysis/BUILD.gn
+1-0llvm/lib/Analysis/CMakeLists.txt
+1,956-1,9034 files