LLVM/project 82f48a7 — compiler-rt/lib/sanitizer_common sanitizer_linux.cpp, compiler-rt/lib/sanitizer_common/tests sanitizer_linux_test.cpp

[sanitizer] Use clock_nanosleep_time64 for 32-bit Linux delays (#241663)

internal_usleep passes libc's struct timespec directly to the nanosleep
syscall. On 32-bit Linux with time64 musl, that structure does not match
the legacy syscall layout.
    
Use clock_nanosleep_time64 when its syscall number is available, with
explicit 64-bit seconds and nanoseconds.

clock_nanosleep_time64 was introduced in Linux 5.1. On older kernels,
ENOSYS triggers a DCHECK in debug builds.
DeltaFile
+13-0compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+6-0compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cpp
+19-02 files

LLVM/project 8f671fe — llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

OpenMP: Use getOrInsertFunction init callback for runtime functions (#242564)

Use the new overload to set up the function on first use. The
MD_callback check is dropped since a newly created function will never
have metadata.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+19-38llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+19-381 files

LLVM/project 8954e3c — llvm/lib/Target/NVPTX NVPTXAsmPrinter.cpp, llvm/test/CodeGen/NVPTX globals_init.ll

[NVPTX] Handle vector splats nested in aggregate initializers (#229073)

A vector splat that is an element of an array or a member of a struct in
a global initializer is not emitted:

```llvm
@tab = constant [2 x <4 x float>] [<4 x float> splat (float 1.0),
                                   <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>]
```

With assertions `llc` stops at `llvm_unreachable("Unexpected Constant
type")` in `bufferLEByte`. Without assertions it exits 0 and the data is
wrong: the table above comes out as `{1,2,3,4}, {0,0,0,0}`, and `ptxas`
accepts it.

A splat is a vector-typed `ConstantFP` since #197427 (and a
`ConstantInt` with `-use-constant-int-for-fixed-length-splat`). #182544
handled one that is a global's whole initializer; a nested one goes
through `bufferLEByte`, which did not pass it on to

    [18 lines not shown]
DeltaFile
+25-88llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+37-0llvm/test/CodeGen/NVPTX/globals_init.ll
+62-882 files

LLVM/project 51c93e5 — clang/lib/Sema SemaChecking.cpp

fix

Created using spr 1.3.7
DeltaFile
+5-5clang/lib/Sema/SemaChecking.cpp
+5-51 files

LLVM/project 113859b — llvm/include/llvm/CodeGen LiveIntervalCalc.h LiveInterval.h, llvm/lib/CodeGen LiveIntervalCalc.cpp LiveIntervals.cpp

CodeGen: Create register unit dead defs in slot order

computeRegUnitRange created dead defs in use list order, so each one
was inserted into the middle of the segment vector. To avoid the
quadratic cost, every register unit range was built through a std::set
of segments, costing a heap allocation per segment.

Sort the def slots first and append the dead defs in order instead,
and remove the segment set, since register units were its only user.
This also shrinks LiveRange by a pointer.

llc instructions:u:
  CTMark x86_64:                    -0.42%
  CTMark arm64:                     -0.32%
  Largest AMDGPU lit tests, gfx942: -0.24%

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+0-86llvm/lib/CodeGen/LiveInterval.cpp
+10-15llvm/lib/CodeGen/LiveIntervals.cpp
+1-21llvm/include/llvm/CodeGen/LiveInterval.h
+0-12llvm/lib/CodeGen/LiveIntervalCalc.cpp
+0-5llvm/include/llvm/CodeGen/LiveIntervalCalc.h
+11-1395 files

LLVM/project a87ef6b — clang/docs LanguageExtensions.md, clang/include/clang/Basic DiagnosticSemaKinds.td

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+39-0clang/lib/Sema/SemaDecl.cpp
+28-0clang/docs/LanguageExtensions.md
+22-0clang/test/CodeGen/oracle_function.c
+20-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+15-0clang/test/Sema/attr-oracle-function.c
+10-0clang/lib/CodeGen/CodeGenFunction.cpp
+134-03 files not shown
+150-09 files

LLVM/project 66fe072 — clang/docs LanguageExtensions.md, clang/lib/CodeGen CGBuiltin.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+81-5clang/lib/Sema/SemaChecking.cpp
+77-0clang/test/CodeGen/builtin-speculative-load.c
+51-0clang/docs/LanguageExtensions.md
+39-0clang/lib/Sema/SemaDecl.cpp
+29-0clang/test/Sema/builtin-speculative-load.c
+23-0clang/lib/CodeGen/CGBuiltin.cpp
+300-58 files not shown
+389-514 files

LLVM/project 43ce91a — clang/test/CodeGen oracle_function.c

fix

Created using spr 1.3.7
DeltaFile
+13-6clang/test/CodeGen/oracle_function.c
+13-61 files

LLVM/project d1ea955 — llvm/lib/IR Verifier.cpp

Verifier: Check each metadata attachment of an instruction once

visitInstruction looked up about 30 metadata kinds for every
instruction, followed by another getAllMetadata call. Collect the set
once and switch over the kinds.

instructions in opt: consumer-typeset z08.bc -0.94%,
  kimwitu++ k.bc -0.64%, sqlite3 -0.43%, SPASS cnf.bc -0.09%.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+157-166llvm/lib/IR/Verifier.cpp
+157-1661 files

LLVM/project 092f2a1 — llvm/lib/IR Verifier.cpp

Verifier: Look up the AMDGPU metadata kinds once

visitInstruction looked up two AMDGPU metadata kinds by name for every
instruction. Look up their IDs when constructing the Verifier.

O3 instructions in opt:
consumer-typeset z08.bc -0.34%, kimwitu++ k.bc -0.22%, sqlite3 -0.15%.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+10-3llvm/lib/IR/Verifier.cpp
+10-31 files

LLVM/project 4269ff6 — llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp, llvm/test/ThinLTO/X86 memprof-kcfi.ll

[MemProf] Strip !kcfi_type metadata from instantiated function clones (#242532)

CloneFunction copies all function-level metadata onto newly instantiated
.memprof.N clones, including !kcfi_type. Under -fsanitize=kcfi, the
backend emits a KCFI type-hash preamble and __cfi_ symbol before every
function definition carrying !kcfi_type regardless of whether its
address is taken. Leaving !kcfi_type on .memprof.N clones adds code and
symbol-table overhead and makes those clones valid KCFI indirect-call
targets even though MemProf clones are only ever called directly.

Clear MD_kcfi_type on newly created clones in both createFunctionClones
and ModuleCallsiteContextGraph::cloneFunctionForCallsite, matching
external .memprof.N declarations which carry no !kcfi_type.

Assisted-by: Gemini
DeltaFile
+75-0llvm/test/ThinLTO/X86/memprof-kcfi.ll
+6-0llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+81-02 files

LLVM/project f46e523 — llvm/lib/CodeGen/GlobalISel LoadStoreOpt.cpp, llvm/test/CodeGen/AArch64/GlobalISel store-merging.ll store-merging.mir

[GlobalISel] Don't merge stores across a store that can't be merged (#239627)

LoadStoreOpt leaves a store out of a merge when it may alias an
operation the merged store would be moved past, but it then merged the
remaining stores as if they were still adjacent. With stores to offsets
0, 4 and 8 where the store to 4 is left out, the stores to 0 and 8 were
merged into one 8-byte store at offset 0, which writes the value for
offset 8 to offset 4.

Merge the stores on each side of a store that is left out separately.

The first commit adds the tests with the current output.

Fixes #235467.

Assisted by Claude (Anthropic).
DeltaFile
+108-0llvm/test/CodeGen/AArch64/GlobalISel/store-merging.mir
+48-0llvm/test/CodeGen/AArch64/GlobalISel/store-merging.ll
+12-5llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+168-53 files

LLVM/project 9f618f4 — llvm/lib/TableGen Main.cpp, llvm/test/TableGen escape-dependency-filenames.td

[TableGen] correctly escape dependency filenames (#160834)

[TableGen] correctly escape dependency filenames

Currently, *-tblgen do not escape special characters in dependency
filenames. This can lead to unnecessary rebuilds when the filenames
contain characters that require escaping, as the build system may not
treat them correctly.

For instance, when building LLVM in a directory that contains spaces
("/home/user/repos/llvm project" in the example below), the build system
always rebuilds a large portion of the project despite nothing having
changed, due to an unescaped space in the dependency filename:

    $ ninja -C build -d explain
    ninja: Entering directory `build'
    ninja explain: /home/user/repos/llvm is dirty
    ...
    $ cat build/include/llvm/IR/IntrinsicsRISCV.h.d

    [14 lines not shown]
DeltaFile
+36-3llvm/lib/TableGen/Main.cpp
+39-0llvm/test/TableGen/escape-dependency-filenames.td
+75-32 files

LLVM/project 266b559 — utils/bazel/llvm-project-overlay/libc libc_build_rules.bzl

[bazel] Use label-like strings in libc_build_rules.bzl (#242570)

Downstream in Google, all labels are expected to look like real labels
so they can be detected with [standard bazel
libraries](https://github.com/bazel-contrib/buildtools/blob/496abbe0493db8e8ee6b763b0799701f356880be/labels/labels.go#L66).
It looks like other bits of the llvm-project-overlay go through similar
gymnastics:


https://github.com/llvm/llvm-project/blob/f2368ada4905d6003a7a6b7fd7acd99cfc65e8b9/utils/bazel/llvm-project-overlay/libc/test/src/math/libc_math_test_rules.bzl#L26

It is fairly convenient to be able to identify which strings are labels
just by checking which ones successfully parse, so this PR updates
`libc_build_rules.bzl` to conform with the existing convention.
DeltaFile
+2-2utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
+2-21 files

LLVM/project de574ff — clang/docs ReleaseNotes.md, clang/lib/CodeGen CGExpr.cpp CodeGenModule.h

[Clang][CFI] Only normalize integer types `cfi-icall` metadata (#242466)

When using `-fsanitize-cfi-icall-experimental-normalize-integers`, its
normalization was applied unconditionally when creating metadata,
appending `.normalized` and normalizing parts of C++ class vtable
`!type` metadata, virtual member-pointer metadata, virtual call checks,
and `-fexperimental-call-graph-section` metadata

This would cause ThinLTO to see vtable `!type` identifiers that mismatch
RTTI type-infos. Best case, this blocked whole-program devirtualization,
but in the worst case (mixed use of normalization) it would cause WPD to
make unsound transforms. =[

Restricting the normalization and `.normalized` suffix strictly to
`cfi-icall` function type metadata fixes these issues.

Added both direct tests and a CFI test that actually uses ThinLTO and
would break without this.

Assisted-by: Antigravity with Gemini
DeltaFile
+157-0compiler-rt/test/cfi/normalize-integers-wpd.cpp
+87-0clang/test/CodeGenCXX/cfi-icall-normalize-vtable.cpp
+29-23clang/lib/CodeGen/CodeGenModule.cpp
+7-8clang/lib/CodeGen/CodeGenModule.h
+4-0clang/docs/ReleaseNotes.md
+1-1clang/lib/CodeGen/CGExpr.cpp
+285-326 files

LLVM/project 788354f — llvm/lib/Transforms/Scalar ConstraintElimination.cpp

rework comment
DeltaFile
+6-6llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+6-61 files

LLVM/project 7c8490c — llvm/lib/Transforms/Scalar ConstraintElimination.cpp

bool -> enum

(cherry picked from commit 0058a4622d41986579c39891e9ad67dc80dde64b)
DeltaFile
+6-3llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+6-31 files

LLVM/project 949c1c6 — clang/lib/CIR/Dialect/Transforms CIRABIClassifier.cpp, clang/lib/CIR/Dialect/Transforms/TargetLowering CIRABIRewriteContext.cpp

[CIR] Flatten unions passed Direct in CallConvLowering (#241201)

Summary:

- On AMDGPU, a union wider than 64 bits is passed Direct with no coerce
type.
- OGCG passes it as its LLVM type's fields, storage member and tail
padding while CIR passed whole union.

Example:
`  typedef union { int a[3]; double d; } u_pad_t;`
`  void arg_u_pad(u_pad_t u) {}`

`  OGCG: @arg_u_pad(double, [8 x i8])`
`  CIR:  @arg_u_pad(%union.u_pad_t)`

- This patch flattens such a union the same way. Returns stay the union,
as in OGCG.
- A flattened field stored into a packed slot now uses the slot's

    [5 lines not shown]
DeltaFile
+286-0clang/test/CIR/Transforms/abi-lowering/amdgpu-union.cir
+35-13clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
+9-5clang/lib/CIR/Dialect/Transforms/CIRABIClassifier.cpp
+330-183 files

LLVM/project 8338f48 — clang/lib/CIR/Dialect/Transforms CIRABIClassifier.cpp, clang/test/CIR/Transforms/abi-lowering amdgpu-complex.cir

[CIR] Flatten wide _Complex arguments in CallConvLowering (#240808)

Summary:

- When the ABI classifier passes a value `Direct` with no coerce type
and allows flattening, the CIR bridge only flattened struct records. A
`_Complex` was passed unchanged as one argument.
- On AMDGPU, a `_Complex` wider than 64 bits that fits the register
budget is classified this way.
- Classic codegen passes it as its two parts, but ClangIR passed one `{
double, double }`.
- This PR coerces such a `_Complex` to a `{real, imag}` struct, so the
rewriter splits it into two arguments the same way it does for structs.

Reference classic test:
[amdgcn-openmp-device-math-complex.c](https://github.com/llvm/llvm-project/blob/3f4a3d6a4f5cbcc1b7996e342f409234febbe1d0/clang/test/Headers/amdgcn-openmp-device-math-complex.c#L6)

Relates to Issue: https://github.com/llvm/llvm-project/issues/220471

Assisted by: claude opus 5.5
DeltaFile
+135-0clang/test/CIR/Transforms/abi-lowering/amdgpu-complex.cir
+12-0clang/lib/CIR/Dialect/Transforms/CIRABIClassifier.cpp
+147-02 files

LLVM/project 4c412c2 — clang/test/CodeGen oracle_function.c

fix

Created using spr 1.3.7
DeltaFile
+3-3clang/test/CodeGen/oracle_function.c
+3-31 files

LLVM/project f6e8e09 — llvm/lib/Transforms/Scalar ConstraintElimination.cpp

factor out common helper between #235161 and #241988
DeltaFile
+40-18llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+40-181 files

LLVM/project f2368ad — clang/lib/Headers hlsl.h CMakeLists.txt, clang/lib/Headers/hlsl hlsl_debugging.h

[HLSL] Add DebugBreak() (#242109)

Adds support for `void DebugBreak();` to Shader Model 6.10. The function
is defined in a new header `hlsl_debugging.h` which is included from the
main `hlsl.h` header. The function calls the existing
`__builtin_debugtrap()`. Lowering to SPIR-V and DXIL is added in
separate PRs.

Fixes #231325
DeltaFile
+25-0clang/test/SemaHLSL/BuiltIns/DebugBreak-availability.hlsl
+20-0clang/test/CodeGenHLSL/builtins/DebugBreak.hlsl
+19-0clang/lib/Headers/hlsl/hlsl_debugging.h
+14-0clang/test/SemaHLSL/BuiltIns/DebugBreak-error.hlsl
+1-0clang/lib/Headers/hlsl.h
+1-0clang/lib/Headers/CMakeLists.txt
+80-06 files

LLVM/project be5e68e — llvm/include/llvm/IR PassManagerImpl.h

IR: Look up PassInstrumentation once when erasing invalidated results (#242562)

AnalysisManager::invalidate looked up the cached PassInstrumentation
result for each erased result. It is never invalidated, so look it up
once.

Whole O3 instructions (callgrind): kimwitu++ k.bc -0.27%, SPASS cnf.bc
-0.05%, sqlite3 -0.02%.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+2-1llvm/include/llvm/IR/PassManagerImpl.h
+2-11 files

LLVM/project 8bf87b8 — flang/lib/Semantics check-omp-structure.cpp resolve-names.cpp, flang/test/Lower/OpenMP assumption-submodule.f90 assumption.f90

[flang][OpenMP] Support for "assumes no_parallelism" (#240882)

Support for the no_parallelism clause in assumes directive.
DeltaFile
+273-48flang/test/Lower/OpenMP/assumption.f90
+176-2flang/test/Semantics/OpenMP/declarative-directive01.f90
+58-12flang/lib/Semantics/resolve-names.cpp
+51-7flang/test/Lower/OpenMP/assumption-submodule.f90
+48-5flang/test/Parser/OpenMP/assumption.f90
+44-1flang/lib/Semantics/check-omp-structure.cpp
+650-7515 files not shown
+747-15421 files

LLVM/project 4b89962 — llvm/lib/Target/LoongArch LoongArchMergeBaseOffset.cpp

[LoongArch][NFC] Fix "i" -> "I" stylistically
DeltaFile
+1-1llvm/lib/Target/LoongArch/LoongArchMergeBaseOffset.cpp
+1-11 files

LLVM/project 947cfaa — llvm/lib/Target/LoongArch LoongArchMergeBaseOffset.cpp, llvm/test/CodeGen/LoongArch merge-base-offset.ll

[LoongArch] Teach LoongArchMergeBaseOffsetOpt::foldLargeOffset() about SLLI.D
DeltaFile
+31-11llvm/lib/Target/LoongArch/LoongArchMergeBaseOffset.cpp
+4-7llvm/test/CodeGen/LoongArch/merge-base-offset.ll
+35-182 files

LLVM/project b28ff7f — llvm/lib/Target/LoongArch/MCTargetDesc LoongArchMatInt.cpp, llvm/test/CodeGen/LoongArch fp-minimum-maximum.ll merge-base-offset.ll

[LoongArch] Load suitable immediates with LU12I.W+SLLI.D
DeltaFile
+47-48llvm/test/CodeGen/LoongArch/vector-fp-imm.ll
+35-25llvm/test/CodeGen/LoongArch/fsqrt-reciprocal-estimate.ll
+10-14llvm/test/CodeGen/LoongArch/imm.ll
+9-6llvm/test/CodeGen/LoongArch/merge-base-offset.ll
+15-0llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMatInt.cpp
+8-6llvm/test/CodeGen/LoongArch/fp-minimum-maximum.ll
+124-998 files not shown
+142-11614 files

LLVM/project ecad559 — llvm/lib/Target/LoongArch LoongArchMergeBaseOffset.cpp, llvm/test/CodeGen/LoongArch merge-base-offset.ll

[LoongArch] Teach LoongArchMergeBaseOffsetOpt::foldLargeOffset() about SLLI.D
DeltaFile
+31-11llvm/lib/Target/LoongArch/LoongArchMergeBaseOffset.cpp
+4-7llvm/test/CodeGen/LoongArch/merge-base-offset.ll
+35-182 files

LLVM/project 6f0e334 — llvm/lib/Target/LoongArch LoongArchMergeBaseOffset.cpp

[LoongArch][NFC] Fix "i" -> "I" stylistically
DeltaFile
+1-1llvm/lib/Target/LoongArch/LoongArchMergeBaseOffset.cpp
+1-11 files

LLVM/project 3fbedbb — llvm/test/CodeGen/LoongArch imm.ll

[LoongArch][NFC] Add baseline test cases for immediates loadable with LU12I.W+SLLI.D
DeltaFile
+59-0llvm/test/CodeGen/LoongArch/imm.ll
+59-01 files