workflows/release-documentation: Rework workflow to make it testable
Removed the environment declaration from the validation job and split
out the www-releases update into a separate job. This makes it safe
and possible to add a pull_request trigger so we can at least test
building the documentation when someone submits a pull request.
workflows: Remove unnecessary checkouts before uses of upload-release-artifact (#213830)
The workflow is now self-contained and checks out its own scripts, so we
don't need to do this in the calling workflow. The '$' prefix in the
uses tag tells github actions to load the action from the repository
directly rather than searching for it on the local file system.
https://github.blog/changelog/2026-07-30-reference-same-repository-actions-with-self-repository-syntax/
[AMDGPU][GISel] Add RegBankLegalize rules for amdgcn_tanh
Enable the existing gfx1250 and gfx13 GlobalISel coverage now that tanh operands are assigned to VGPRs.
Change-Id: I38b5693015550df52042dc52d1151ed4b7fea118
[clang][Lex] Fix ambiguous reference to Token error (#214300)
At least with GCC 11.4.0 this is deemed an error.
Fixes: 56dc58dc2550 ("[Clang][Preprocessor] Unify header-name lookahead
for import and include (#191004)")
[AMDGPU][Clang] Handle instantiation-dependent fence arguments
Refactor atomic builtin checks into their switch case and defer constant
evaluation of dependent arguments until instantiation, avoiding a potential
crash during template definition.
Fixes ROCM-29058.
[AsmPrinter] Use DenseMap instead of MapVector (NFC) (#214256)
MBBSectionNumBlocks is accessed only via MapVector::operator[].
This patch changes its type to DenseMap to avoid populating the vector
portion of MapVector.
workflows: Remove unnecessary checkouts before uses of upload-release-artifact
The workflow is on self-contained and checks out its own scripts, so we
don't need to do this in the calling workflow. The '$' prefix in the
uses tag tells github actions to load the action from the repository
directly rather than searching for it on the local file system.
https://github.blog/changelog/2026-07-30-reference-same-repository-actions-with-self-repository-syntax/
[AMDGPU][Clang] Handle instantiation-dependent fence arguments
Refactor atomic builtin checks into their switch case and defer constant
evaluation of dependent arguments until instantiation, avoiding a potential
crash during template definition.
Fixes ROCM-29058.
[clangd][HLSL] Add hover support for vector swizzle and matrix element access (#212741)
Hovering over a vector swizzle expression (e.g. `.xyz`) or a matrix
element access (e.g. `._m00`) previously produced no hover information,
since ExtVectorElementExpr and MatrixElementExpr were not handled in
getHoverContents(const Expr *E).
This patch adds support for these expressions within `getHoverContents`
by extracting the accessor name and resolved type for both node kinds.
Fixes #212612
[flang][OpenMP] Fix wrong results for FORALL in a workshare construct (#211371)
A FORALL in a workshare construct could produce wrong results
non-deterministically. This is caused by two issues in the workshare
lowering:
1. A FORALL whose left-hand side may overlap its right-hand side is
lowered into two loop nests around a runtime value stack: the first nest
evaluates each right-hand side and pushes it, the second one fetches the
saved values back with a running counter. That counter lives in a
fir.alloca which, since omp.parallel is an alloca scope, is thread
private. The counter is read, incremented and written back from inside
the omp.single generated for the fetch, because the incremented value is
only available there. Only the thread which executed the omp.single
therefore bumped its own copy of the counter, and all the other threads
kept a stale one and refetched an already consumed element on the
following iterations.
Collect the thread local memory which is only updated by the thread
[15 lines not shown]
[CodeGen] Fix -fsanitize=array-bounds for __sized_by / _or_null pointers
`EmitCountedByBoundsChecking()` assumed a CountAttributedType is always
a __counted_by pointer. That isn't true, there are four versions of the
attribute:
* `__counted_by`: Already handled correctly.
* `__counted_by_or_null`: Incorectly handled.
* `__sized_by`: Incorreclty handled.
* `__sized_by_or_null`: Incorreclty handled.
In particular:
* __sized_by / __sized_by_or_null: the loaded bound is a byte count, but the
element index was compared against it directly, so an access was only
flagged once the index exceeded the byte count -- missing out-of-bounds
accesses for a pointee larger than one byte. Scale the index to bytes
('index * sizeof(element)') before comparing. counted_by counts elements
and is unchanged; a void (or otherwise zero-sized) pointee uses the GNU
[13 lines not shown]
[CodeGen] Fix __builtin_dynamic_object_size for __sized_by / _or_null pointers
`emitCountedByPointerSize()` assumed a CountAttributedType is always
a __counted_by pointer. That isn't true, there are four versions of the
attribute:
* `__counted_by`: Already handled correctly.
* `__counted_by_or_null`: Incorectly handled.
* `__sized_by`: Incorreclty handled.
* `__sized_by_or_null`: Incorreclty handled.
In particular:
* __sized_by / __sized_by_or_null: the attribute argument is a byte count,
but the object size was computed as count * sizeof(*ptr), over-reporting by
the element size for any pointee larger than one byte. Use the count
directly for the byte-counting variants.
* __counted_by_or_null / __sized_by_or_null: a null pointer describes no
[20 lines not shown]
[CodeGen] Fix -fsanitize=array-bounds for __sized_by / _or_null pointers
`EmitCountedByBoundsChecking()` assumed a CountAttributedType is always
a __counted_by pointer. That isn't true, there are four versions of the
attribute:
* `__counted_by`: Already handled correctly.
* `__counted_by_or_null`: Incorectly handled.
* `__sized_by`: Incorreclty handled.
* `__sized_by_or_null`: Incorreclty handled.
In particular:
* __sized_by / __sized_by_or_null: the loaded bound is a byte count, but the
element index was compared against it directly, so an access was only
flagged once the index exceeded the byte count -- missing out-of-bounds
accesses for a pointee larger than one byte. Scale the index to bytes
('index * sizeof(element)') before comparing. counted_by counts elements
and is unchanged; a void (or otherwise zero-sized) pointee uses the GNU
[13 lines not shown]
[CodeGen] Fix __builtin_dynamic_object_size for __sized_by / _or_null pointers
`emitCountedByPointerSize()` assumed a CountAttributedType is always
a __counted_by pointer. That isn't true, there are four versions of the
attribute:
* `__counted_by`: Already handled correctly.
* `__counted_by_or_null`: Incorectly handled.
* `__sized_by`: Incorreclty handled.
* `__sized_by_or_null`: Incorreclty handled.
In particular:
* __sized_by / __sized_by_or_null: the attribute argument is a byte count,
but the object size was computed as count * sizeof(*ptr), over-reporting by
the element size for any pointee larger than one byte. Use the count
directly for the byte-counting variants.
* __counted_by_or_null / __sized_by_or_null: a null pointer describes no
[20 lines not shown]
[CodeGen][NFC] Split __sized_by tests into their own file and rename test cases (#213793)
In future patches the coverage of the `__counted_by` family of
attributes
will be increased. To help with this, this patch refactors the existing
test file.
1. Split `__sized_by` tests into their own file. In later patches files
will be added for each attribute, so it makes sense for each attribute
to have its own file.
2. Replace `testN` test case names with human-readable descriptions. Not
all test cases that will be added in the future will apply to all
attributes. If we kept using the `testN` naming convention it would
leave odd gaps in the test numbering, because we try to keep what a
test case tests consistent across files (i.e. `testN` would roughly
test the same thing but with a different attribute). Using named test
cases completely avoids this.
[offload] Add CUDA_ROOT to path for unit tests (#214282)
We need this to fix the test added in
https://github.com/llvm/llvm-project/pull/212860. Right now it errors
saying it can't find `ptxas`.
We already have code doing this for the e2e tests, but we also need it
for the unit tests.
We had a similar fix for AMDGPU in
https://github.com/llvm/llvm-project/pull/213149.
Locally reproduced the issue and verified the fix.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply at anthropic.com>
workflows/upload-release-artifact: Make this action self-contained (#213828)
The action now checks out its own files so calling workflows don't need
to do this. This helps prevent mistakes where the calling workflow
does not checkout the right files causing this action to fail.
[llvm-objcopy] Add elf64-amdgpu to supported formats in command guide
Update the llvm-objcopy command guide's "Supported formats" section to
include elf64-amdgpu, added in the preceding commit.
[Clang][Preprocessor] Unify header-name lookahead for import and include (#191004)
Introduce Preprocessor::isNextPPTokenHeaderNameOrOneOf to centralize
lookahead logic for header-name formation and token classification under
ParsingFilename mode.
Refactor handling of C++20 module/import contextual keywords and
LexHeaderName to use the new helper, ensuring consistent behavior
between `import` and `#include`.
Try to form a valid header-name token during lookahead. If that fails
and the next token is not one of the expected alternatives, treat it as
not an `import` directive or as an invalid `#include` (missing
<FILENAME>/"FILENAME").
```cpp
#define FOO foo>
#include <:FOO
```
[13 lines not shown]