LLVM/project 56bb0a4llvm/test/CodeGen/SPIRV lit.local.cfg

[SPIR-V] Use ToolSubst for spirv-tools lit substitutions (#192462)

Bare-string substitutions match as substrings and the replacement path
contains the tool name, causing corrupted RUN lines

The issue is reproducible, for example, when path to llvm has tool name
substring at any point
DeltaFile
+4-4llvm/test/CodeGen/SPIRV/lit.local.cfg
+4-41 files

LLVM/project f51159dllvm/lib/Target/SPIRV SPIRVInstructionSelector.cpp SPIRVTypeInst.cpp, llvm/test/CodeGen/SPIRV/transcoding store-atomic.ll load-atomic.ll

[SPIRV] Lower load/store atomic to OpAtomicLoad/OpAtomicStore
DeltaFile
+96-7llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+19-26llvm/test/CodeGen/SPIRV/transcoding/store-atomic.ll
+19-25llvm/test/CodeGen/SPIRV/transcoding/load-atomic.ll
+41-0llvm/test/CodeGen/SPIRV/transcoding/atomic-load-store-unsupported.ll
+18-0llvm/lib/Target/SPIRV/SPIRVTypeInst.cpp
+4-4llvm/lib/Target/SPIRV/SPIRVISelLowering.cpp
+197-623 files not shown
+211-669 files

LLVM/project 0993b11clang/include/clang/AST ASTContext.h, clang/lib/AST ASTContext.cpp

[clang] Clear ASTContext::TUDecl in 'cleanup' for easier debugging (#191697)

While the ASTContext has more things inside, I think we should at least
clear the TUDecl so that when traversing the (dangling) AST would
immediately step on the null-dereference instead of chasing dangling
pointers and crash later.

I was bitten by this in #191058.

This commit should be NFC - assuming that people didn't traverse already
dangling ASTs.
DeltaFile
+2-0clang/include/clang/AST/ASTContext.h
+1-0clang/lib/AST/ASTContext.cpp
+3-02 files

LLVM/project 03d3d6butils/bazel/llvm-project-overlay/libc BUILD.bazel

[Bazel] Fixes 735b152 (#192673)

This fixes 735b15239c493fce6a5033776470892f30d7e00e.

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+2-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+2-01 files

LLVM/project b077718bolt/include/bolt/Core MCPlus.h MCPlusBuilder.h

[BOLT] Support non-null MCInst operands in annotation handling (#192188)

The annotation sentinel in BOLT is a null MCInst operand appended after
all prime operands. However, some architectures (e.g. Hexagon) use
non-null MCInst operands as legitimate prime operands for duplex
sub-instructions. The existing code treated any MCInst operand as the
annotation sentinel, causing duplex sub-instructions to be
misidentified.
    
In getNumPrimeOperands(), only treat a null MCInst operand as the
sentinel. In getAnnotationInstOp(), skip non-null MCInst operands when
searching for the annotation sentinel.
DeltaFile
+9-2bolt/include/bolt/Core/MCPlus.h
+1-3bolt/include/bolt/Core/MCPlusBuilder.h
+10-52 files

LLVM/project 8ed0af8llvm/lib/Target/SPIRV SPIRVInstructionSelector.cpp SPIRVTypeInst.cpp, llvm/test/CodeGen/SPIRV/transcoding store-atomic.ll load-atomic.ll

[SPIRV] Lower load/store atomic to OpAtomicLoad/OpAtomicStore
DeltaFile
+75-7llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+19-26llvm/test/CodeGen/SPIRV/transcoding/store-atomic.ll
+19-25llvm/test/CodeGen/SPIRV/transcoding/load-atomic.ll
+41-0llvm/test/CodeGen/SPIRV/transcoding/atomic-load-store-unsupported.ll
+12-0llvm/lib/Target/SPIRV/SPIRVTypeInst.cpp
+4-4llvm/lib/Target/SPIRV/SPIRVISelLowering.cpp
+170-623 files not shown
+178-669 files

LLVM/project bf3cc17mlir/include/mlir/Dialect/Tosa/IR TargetEnv.h, mlir/lib/Dialect/Tosa/IR TargetEnv.cpp

[mlir][tosa] Add `draft` information to specification version (#192122)

The draft flag can be used by useful to indicate that a specification
version is not yet finalized, and may be subject to change. This is
particularly important for serialized formats that offer guarantees
around backwards compatibility. By exposing `draft` information in the
specification version in the target environment, we can allow consumers
to query this information.
DeltaFile
+22-22mlir/test/Dialect/Tosa/tosa-validation-version-1p0-invalid.mlir
+22-5mlir/include/mlir/Dialect/Tosa/IR/TargetEnv.h
+3-2mlir/lib/Dialect/Tosa/IR/TargetEnv.cpp
+2-2mlir/test/Dialect/Tosa/tosa-validation-version-1p0-pro-fp-invalid.mlir
+1-1mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
+50-325 files

LLVM/project 735b152libc/src/strings strncasecmp.cpp strcasecmp.cpp, libc/test/src/string strcmp_test.cpp

[libc] Fix strcasecmp/strncasecmp signedness and add tests (#192632)

Fixed character signedness bug in strcasecmp and strncasecmp
implementations in src/strings/ where characters > 127 were not
correctly handled.

Added LIBC_CRASH_ON_NULLPTR checks to both functions.

Enhanced unit tests in test/src/strings/ to be comprehensive without
duplicating basic case insensitivity tests.

Updated assertions in strcasecmp_test, strncasecmp_test, and strcmp_test
to check for sign instead of exact value.
DeltaFile
+57-0libc/test/src/strings/strncasecmp_test.cpp
+47-0libc/test/src/strings/strcasecmp_test.cpp
+10-20libc/test/src/string/strcmp_test.cpp
+6-3libc/src/strings/strncasecmp.cpp
+6-3libc/src/strings/strcasecmp.cpp
+126-265 files

LLVM/project e3709e3clang/include/clang/Basic DiagnosticSemaKinds.td LangOptions.def, clang/include/clang/Options Options.td

[Clang] [C++26] Expansion Statements (Part 10)
DeltaFile
+69-0clang/test/SemaCXX/cxx2c-expansion-stmts-limit.cpp
+18-0clang/lib/Sema/SemaExpand.cpp
+9-0clang/test/SemaCXX/cxx2c-fexpansion-statements.cpp
+4-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+4-0clang/include/clang/Options/Options.td
+1-0clang/include/clang/Basic/LangOptions.def
+105-01 files not shown
+106-07 files

LLVM/project 9e351ebclang/include/clang/Sema Sema.h, clang/lib/Sema SemaExpand.cpp TreeTransform.h

[Clang] [C++26] Expansion Statements (Part 3)
DeltaFile
+170-0clang/lib/Sema/SemaExpand.cpp
+86-4clang/lib/Sema/TreeTransform.h
+40-40clang/test/Parser/cxx2c-expansion-statements.cpp
+37-1clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+26-3clang/lib/Sema/SemaTemplateInstantiate.cpp
+20-0clang/include/clang/Sema/Sema.h
+379-484 files not shown
+394-6510 files

LLVM/project 95dc9adclang/lib/AST ExprConstant.cpp, clang/lib/AST/ByteCode Compiler.cpp Compiler.h

[Clang] [C++26] Expansion Statements (Part 7)
DeltaFile
+1,472-0clang/test/SemaCXX/cxx2c-expansion-stmts.cpp
+42-0clang/lib/AST/ByteCode/Compiler.cpp
+40-0clang/lib/AST/ExprConstant.cpp
+2-1clang/lib/AST/ByteCode/Compiler.h
+3-0clang/lib/Sema/SemaDeclCXX.cpp
+1,559-15 files

LLVM/project 96d8e55clang/include/clang/Basic DiagnosticSemaKinds.td, clang/lib/Sema SemaExpand.cpp TreeTransform.h

[Clang] [C++26] Expansion Statements (Part 6)
DeltaFile
+105-6clang/lib/Sema/SemaExpand.cpp
+23-3clang/lib/Sema/TreeTransform.h
+2-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+130-93 files

LLVM/project 327d974clang/include/clang/AST StmtCXX.h DeclTemplate.h, clang/lib/AST StmtCXX.cpp ASTImporter.cpp

[Clang] [C++26] Expansion Statements (Part 1)
DeltaFile
+576-0clang/include/clang/AST/StmtCXX.h
+157-0clang/lib/AST/StmtCXX.cpp
+125-0clang/include/clang/AST/DeclTemplate.h
+120-0clang/lib/AST/ASTImporter.cpp
+47-0clang/lib/Serialization/ASTReaderStmt.cpp
+44-0clang/include/clang/AST/ExprCXX.h
+1,069-041 files not shown
+1,435-2947 files

LLVM/project 5bedd6aclang/docs ReleaseNotes.rst, clang/include/clang/Basic DiagnosticCommonKinds.td

[Clang] [C++26] Expansion Statements (Part 11)
DeltaFile
+104-0clang/test/AST/ast-print-expansion-stmts.cpp
+49-0clang/test/AST/ast-dump-expansion-stmt.cpp
+0-4clang/include/clang/Basic/DiagnosticCommonKinds.td
+1-1clang/www/cxx_status.html
+1-0clang/docs/ReleaseNotes.rst
+155-55 files

LLVM/project e5221a3clang/include/clang/Basic DiagnosticSemaKinds.td, clang/include/clang/Sema ScopeInfo.h

[Clang] [C++26] Expansion Statements (Part 9)
DeltaFile
+135-0clang/test/SemaCXX/cxx2c-expansion-stmts-control-flow.cpp
+38-9clang/lib/Sema/SemaLookup.cpp
+28-2clang/lib/Sema/SemaStmt.cpp
+9-2clang/lib/Parse/ParseStmt.cpp
+6-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+5-1clang/include/clang/Sema/ScopeInfo.h
+221-141 files not shown
+223-157 files

LLVM/project 040e45eclang/include/clang/Parse Parser.h, clang/include/clang/Sema Sema.h

[Clang] [C++26] Expansion Statements (Part 2)
DeltaFile
+181-14clang/lib/Parse/ParseStmt.cpp
+76-0clang/lib/Sema/SemaExpand.cpp
+65-0clang/test/Parser/cxx2c-expansion-statements.cpp
+28-31clang/lib/Parse/ParseDecl.cpp
+37-3clang/include/clang/Parse/Parser.h
+32-1clang/include/clang/Sema/Sema.h
+419-498 files not shown
+484-6014 files

LLVM/project ffeb99aclang/include/clang/Basic DiagnosticSemaKinds.td, clang/include/clang/Sema Sema.h

[Clang] [C++26] Expansion Statements (Part 5)
DeltaFile
+499-14clang/lib/Sema/SemaExpand.cpp
+71-0clang/lib/Sema/TreeTransform.h
+21-15clang/lib/Sema/SemaStmt.cpp
+12-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+12-0clang/include/clang/Sema/Sema.h
+615-295 files

LLVM/project 5c1550aclang/include/clang/Parse Parser.h, clang/include/clang/Sema Sema.h Scope.h

[Clang] [C++26] Expansion Statements (Part 4)
DeltaFile
+266-221clang/lib/Sema/SemaStmt.cpp
+2-83clang/include/clang/Parse/Parser.h
+11-44clang/lib/Parse/Parser.cpp
+48-3clang/include/clang/Sema/Sema.h
+40-1clang/include/clang/Sema/Scope.h
+20-17clang/lib/Parse/ParseStmt.cpp
+387-36915 files not shown
+538-45021 files

LLVM/project 93243e9clang/test/CodeGenCXX cxx2c-enumerating-expansion-statements.cpp cxx2c-iterating-expansion-stmt.cpp

[Clang] [C++26] Expansion Statements (Part 8)
DeltaFile
+1,518-0clang/test/CodeGenCXX/cxx2c-enumerating-expansion-statements.cpp
+548-0clang/test/CodeGenCXX/cxx2c-iterating-expansion-stmt.cpp
+493-0clang/test/CodeGenCXX/cxx2c-destructuring-expansion-stmt.cpp
+430-0clang/test/CodeGenCXX/cxx2c-expansion-stmts-control-flow.cpp
+208-0clang/test/CodeGenCXX/cxx2c-expansion-stmts-templates.cpp
+134-0clang/test/CodeGenCXX/cxx2c-expansion-stmts-mangling.cpp
+3,331-03 files not shown
+3,372-39 files

LLVM/project 842f23fllvm/lib/Target/AArch64 AArch64InstrFormats.td AArch64InstrInfo.td, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

[AArch64][llvm] Some instructions should be `HINT` aliases (NFC)

Implement the following instructions as a `HINT` alias instead of a
dedicated instruction in separate classes:
  * `stshh`
  * `stcph`
  * `shuh`
  * `tsb`

Updated all their helper methods too, and updated the `stshh` pseudo
expansion for the intrinsic to emit `HINT #0x30 | policy`.

Code in AArch64AsmPrinter::emitInstruction identified an initial BTI using a
broad bitmask on the HINT immediate, which also matched shuh/stcph (50..52)
This could move the patchable entry label after a non-BTI instruction.
Replaced it with an exact BTI check using the BTI HINT range (32..63) and
AArch64BTIHint::lookupBTIByEncoding(Imm ^ 32).

A following change will remove duplicated code and simplify.

    [2 lines not shown]
DeltaFile
+115-0llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+41-39llvm/lib/Target/AArch64/AArch64InstrFormats.td
+22-3llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+5-14llvm/lib/Target/AArch64/AArch64InstrInfo.td
+5-10llvm/lib/Target/AArch64/AArch64SystemOperands.td
+4-2llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
+192-682 files not shown
+199-698 files

LLVM/project 966ffeamlir/lib/Dialect/Transform/IR Utils.cpp, mlir/test/Dialect/Transform normal-forms.mlir

[mlir] reduce excessive verification in transform

`mergeSymbolsInto` called by the transform interpreter for named
sequence management was calling a full verifier after renaming symbols.
The renaming could have potentially broken symbol table-related
invariants, but not really anything else. Only verify the symbol
table-related invariants intead.
DeltaFile
+8-4mlir/lib/Dialect/Transform/IR/Utils.cpp
+4-5mlir/test/Dialect/Transform/normal-forms.mlir
+12-92 files

LLVM/project 0863312flang/test/Lower loops2.f90 logical-operations.f90

[flang][NFC] Converted five tests from old lowering to new lowering (part 46) (#192439)

Tests converted from test/Lower: logical-operations.f90, loops2.f90,
loops3.f90, memory-alloc.f90, zero-size.f90
DeltaFile
+57-82flang/test/Lower/loops2.f90
+37-34flang/test/Lower/logical-operations.f90
+14-5flang/test/Lower/loops3.f90
+8-8flang/test/Lower/zero-size.f90
+7-5flang/test/Lower/memory-alloc.f90
+123-1345 files

LLVM/project 5e82958llvm/lib/Target/AArch64/MCTargetDesc AArch64InstPrinter.cpp

fixup! Address PR comment about shortened `sysp` with xzr/xzr
DeltaFile
+17-16llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+17-161 files

LLVM/project 456bf22clang/lib/Sema SemaARM.cpp, clang/test/CodeGen/AArch64 pcdphint-atomic-store.c

Remove __arm_atomic_store_with_stshh from llvm (#192419)

This patch is revert of #181386 with some manual changes applied due to
revert conflicts.

Current implementation of __arm_atomic_store_with_stshh is incorrect as
it doesn't enforce the memory ordering constraints as can be seen
[here](https://godbolt.org/z/n5YnbaT8E). Different solution will need to
be implemented, but removing for now so users don't pick this up.
DeltaFile
+0-243llvm/test/CodeGen/AArch64/pcdphint-atomic-store.ll
+0-100clang/lib/Sema/SemaARM.cpp
+0-74clang/test/Sema/AArch64/pcdphint-atomic-store.c
+0-71clang/test/CodeGen/AArch64/pcdphint-atomic-store.c
+0-70llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
+0-47llvm/test/Verifier/AArch64/intrinsic-immarg.ll
+0-60510 files not shown
+0-71416 files

LLVM/project 2ebfe91llvm/lib/Target/AMDGPU AMDGPUMCResourceInfo.cpp AMDGPUResourceUsageAnalysis.cpp, llvm/test/CodeGen/AMDGPU object-linking-local-resources.ll lds-link-time-codegen-indirect.ll

[AMDGPU] Report only local per-function resource usage when object linking is enabled

With object linking the linker aggregates resource usage across TUs via
`.amdgpu.info`, so compile-time pessimism and call-graph propagation duplicate
the linker's work or pollute its inputs.

In this mode, skip the per-callsite conservative bumps in
`AMDGPUResourceUsageAnalysis` and assign each resource symbol in
`AMDGPUMCResourceInfo` a concrete local constant instead of building call-graph
max/or expressions.
DeltaFile
+104-0llvm/test/CodeGen/AMDGPU/object-linking-local-resources.ll
+26-8llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.cpp
+10-1llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp
+4-0llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.h
+1-1llvm/test/CodeGen/AMDGPU/lds-link-time-codegen-indirect.ll
+145-105 files

LLVM/project 70f9ad8llvm/docs AMDGPUUsage.rst, llvm/lib/Target/AMDGPU AMDGPUAsmPrinter.cpp

[AMDGPU] Add `.amdgpu.info` section for per-function metadata

AMDGPU object linking requires the linker to propagate resource usage
(registers, stack, LDS) across translation units. To support this, the compiler
must emit per-function metadata and call graph edges in the relocatable object
so the linker can compute whole-program resource requirements.

This PR introduces a `.amdgpu.info` ELF section using a tagged, length-prefixed
binary format: each entry is encoded as:

```
[kind: u8] [len: u8] [payload: <len> bytes]
```

A function scope is opened by an `INFO_FUNC` entry (containing a symbol
reference), followed by per-function attributes (register counts, flags, private
segment size) and relational edges (direct calls, LDS uses, indirect call
signatures). String data such as function type signatures is stored in a
companion `.amdgpu.strtab` section.

    [4 lines not shown]
DeltaFile
+198-0llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
+159-2llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+116-0llvm/test/MC/AMDGPU/amdgpu-info-roundtrip.s
+111-0llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+110-0llvm/docs/AMDGPUUsage.rst
+83-0llvm/test/CodeGen/AMDGPU/lds-link-time-codegen-typeid.ll
+777-211 files not shown
+1,190-1417 files

LLVM/project ed9da27mlir/include/mlir/Dialect/Transform/IR TransformOps.td, mlir/include/mlir/Dialect/Transform/Interfaces TransformInterfaces.td

[mlir] add normal form checked transform interface (#192647)

This interface can be implemented by operations that guarantee certain
normal forms for themselves and their regions. The operations provide
the list of normal forms they guarantee. This interface interacts with
the typed transform handles removing the need for them to check normal
forms that are guaranteed (and preserved by transforms).

Provide a simple `transform.payload` operation to carry a list of normal
forms and implement the interface.

This exposes the fact that the transform interpreter may be running the
verifier too much, but this is a pre-existing beavior that is orthogonal
to this patch.

Assisted-by: Claude Opus 4.7 / Cursor
DeltaFile
+85-1mlir/test/Dialect/Transform/normal-forms.mlir
+16-25mlir/lib/Dialect/Transform/IR/TransformTypes.cpp
+39-0mlir/lib/Dialect/Transform/Interfaces/TransformInterfaces.cpp
+29-0mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.td
+17-0mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
+16-0mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
+202-264 files not shown
+244-2810 files

LLVM/project 00177efclang/include/clang/Options Options.td, clang/test/Driver cl-options.c

[clang] Exposse -fdiagnostics-print-source-range-info to clang-cl (#192500)
DeltaFile
+1-1clang/include/clang/Options/Options.td
+1-0clang/test/Driver/cl-options.c
+2-12 files

LLVM/project e5bb804llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/readability BUILD.gn

[gn build] Port 96266b71214a (#192663)
DeltaFile
+1-0llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/readability/BUILD.gn
+1-01 files

LLVM/project e7e01e1mlir/lib/Tools/mlir-opt MlirOptMain.cpp, mlir/test/Dialect/Transform normal-forms.mlir

[mlir] MlirOptMain: avoid double verification

MlirOptMain would run verification twice at the end of the processing:
  1. after the last pass in the pipeline;
  2. prior to printing.
Since there is no logic that could mutate, and thus potentially
invalidate, the IR between the two, the second verification is
redundant. Skip it when possible.
DeltaFile
+7-2mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
+1-3mlir/test/Dialect/Transform/normal-forms.mlir
+8-52 files