[clang][NFC] Remove redundant annotation check in AvoidConcat (#238661)
Annotation tokens already return early in AvoidConcat, so PrevTok cannot
be an annotation when getIdentifierInfo() is reached. Remove the
redundant check.
[AMDGPU] Move the encoding suffix for instructions without operands to TableGen (#239077)
Follow-up to #234466. Instead of appending _e64/_sdwa in
AMDGPUInstPrinter::printInst(), put the suffix in the VOPProfile asm
strings for instructions without operands. Using the {_e64|} and
{_sdwa|} variant syntax, the suffix is only seen by the AsmWriter
(variant 0). The VOP3 and SDWA matcher variants still get the bare
mnemonic, since the parser strips the suffix before matching.
The generated matcher is unchanged and the printed output is the
same as before, so there are no test changes.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
CodeGen: Share atomic libcall selection between the legalizers
SelectionDAG and GlobalISel each had their own copies of the choice
between an outline atomic and a __sync_* call. Move it into a common
helper.
The __sync_* call is now always looked up in the DAG's libcall info,
rather than sometimes in the TargetLowering defaults. Also disable
the untested __sync call case in GlobalISel.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[GlobalISel][IRTranslator] Fix inserting a <1 x Ty> into a <1 x Ty> vector (#235828)
Fixes #235314.
`IRTranslatorImpl::translateInsertVector` copied operand 0 (the
destination)
when both the inserted vector and the destination vector have one
element.
Inserting a `<1 x Ty>` at index 0 replaces the whole destination, so the
result must be operand 1.
```
- %2:_(s32) = COPY %0 ; dst
+ %2:_(s32) = COPY %1 ; src
```
Tests in `irtranslator-subvector.ll`: the one-element insert checks now
expect the source operand, the intrinsic suffixes match the argument
types,
[3 lines not shown]
[cmake] Findzstd: probe AIX .a archives for shared objects (#235575)
On AIX, shared libraries are conventionally packaged as `.a` archives
containing shared-object members. The existing heuristic in
`Findzstd.cmake` classifies any `.a` file (other than `.dll.a` import
libraries) as a static library, based solely on the file suffix.
Fix this by probing the found library on AIX. Treat it as shared if `ar
-t` lists a member ending in `.imp`. Otherwise, treat it as shared if
`dump -ov` shows a member whose `Flags` include `SHROBJ` but not
`LOADONLY`. The file-suffix heuristic is preserved unchanged for all
other platforms.
Assisted-by: IBM Bob
---------
Co-authored-by: Hubert Tong <hstong at ca.ibm.com>
Attributor: Fix use-after-free clearing tail calls in AAPrivatizablePtr (#239070)
The tail calls collected during manifest may be erased by a signature
rewrite of their callee before the repair callback runs. Find them in
the callback instead.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[CIR][OpenMP] Add support for 'distribute parallel for' with 'target teams'
Adds support for handling the full '[target] teams distribute parallel for'.
Introduces setting the omp.composite attibute for the 'distribute parallel for'
composite construct.
Assisted-by: Cursor / Claude Sonnet 5 High
[CIR][OpenMP] Add initial support for distribute
This patch adds initial support for the OpenMP 'distribute' directive. Basic
code generation for the standalone and combined cases is introduced. Support
for clauses will be added in the future. The composite 'teams distribute
parallel for' form will be added in a subsequent patch.
Assisted-by: Cursor / Claude Sonnet 5 High
[CIR][OpenMP] Add support for omp teams
This patch adds support for the OpenMP 'teams' directive, both standalone
and as the combined `target teams` construct. isCombinableLeaf now also
recognizes teams, so an explicitly-nested `target` + `teams` pair gets
the same omp.combined marking as the combined case.
Assisted-by: Cursor / Claude Sonnet 5 High
[CIR][OpenMP] Add support for host_eval so that SPMD kernels can be used
This patch adds support for host_eval so that SPMD kernels and in the future
num_threads and other clauses can be implemented correctly.
Assisted-by: Cursor / Claude Sonnet 5 High
[CIR][OpenMP] Add support for the OpenMP 'for' directive
This patch adds support for wsloop in ClangIR: the `for` directive and its
combined forms `parallel for` and `target parallel for`. This is lowered to an
omp.wsloop + omp.loop_nest, nested utilizing the existing queue-based
decomposition.
Assisted-by: Cursor / Claude Sonnet 5 High
[libc][annex_k] Terminate abort_handler_s through OSUtil instead of abort
Code under src/__support must not depend on public entrypoints such as
src/stdlib/abort.h and must stay OS independent. Terminate through the
OSUtil exit abstraction instead, following the precedent in libc_assert.h.
[libc][annex_k] Terminate abort_handler_s through OSUtil instead of abort
Code under src/__support must not depend on public entrypoints such as
src/stdlib/abort.h and must stay OS independent. Terminate through the
OSUtil exit abstraction instead, following the precedent in libc_assert.h.
Co-Authored-By: Claude Fable 5.1 <noreply at anthropic.com>
Attributor: Work around GCC 9 ICE in AAHeapToStack manifest (#239061)
GCC 9 crashes on the generic lambda added in f4b99f3edd466. Use an
explicit parameter type instead.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[cmake] Findzstd: probe AIX .a archives for shared objects
On AIX, shared libraries are conventionally packaged as `.a` archives
containing shared-object members. The existing heuristic in
`Findzstd.cmake` classifies any `.a` file (other than `.dll.a` import
libraries) as a static library, based solely on the file suffix.
Fix this by probing the found library on AIX. Treat it as shared if
`ar -t` lists a member ending in `.imp`. Otherwise, treat it as shared
if `dump -ov` shows a member whose `Flags` include `SHROBJ` but not
`LOADONLY`. The file-suffix heuristic is preserved unchanged for all
other platforms.
---------
Assisted-by: IBM Bob