LLVM/project 8676929.github/workflows libcxx-pr-test-tools.yml, libcxx/utils/ci run-buildbot

[libc++][CI] Add a Github workflow to test libc++ tools (#211067)

We have a few scripts under libcxx/utils, and they wouldn't be tested on
a regular basis. As a result, changes to e.g. the build system could
break these scripts, which in turn could break some Github workflows
like the libc++ PR benchmarking workflow.

This patch adds a new `test-tools` configuration to `run-buildbot` which
allows testing these tools locally, and a new dedicated Github workflow
to run it.
DeltaFile
+54-0.github/workflows/libcxx-pr-test-tools.yml
+31-0libcxx/utils/ci/run-buildbot
+85-02 files

LLVM/project 982688dclang/test/OpenMP ompx_attributes_codegen.cpp openmp-read-only-feature.c

clang/AMDGPU: Migrate cc1 tests to subarch triples (5) (#211840)

Rewrite OpenMP cc1 test RUN lines to the new subarch triple form,
dropping the redundant -target-cpu, and regenerate autogenerated CHECK
lines. Tests that intentionally assert the "target-cpu" attribute are
left unchanged.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+2-2clang/test/OpenMP/ompx_attributes_codegen.cpp
+2-2clang/test/OpenMP/openmp-read-only-feature.c
+1-1clang/test/OpenMP/metadirective_device_arch_codegen.cpp
+1-1clang/test/OpenMP/metadirective_device_isa_codegen_amdgcn.cpp
+1-1clang/test/OpenMP/target_num_teams_num_threads_attributes.cpp
+1-1clang/test/OpenMP/amdgcn_ldbl_check.cpp
+8-82 files not shown
+10-108 files

LLVM/project 43dbc63llvm/lib/TargetParser AMDGPUTargetParser.cpp, llvm/unittests/TargetParser TargetParserTest.cpp

AMDGPU: Reject unrecognized amdgpu subarch in TargetID parsing (#211866)

A bare "amdgpu" or an unrecognized "amdgpu<x>" both parse to the
amdgpu arch with no subarch; TargetID::parse previously accepted them,
taking a named processor and ignoring the missing subarch.

Reject triples with no subarch, unless it uses the legacy spelling.
This is another workaround for Triple not having a proper unknown value
for subarches.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+9-0llvm/unittests/TargetParser/TargetParserTest.cpp
+4-0llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+13-02 files

LLVM/project b6c6666llvm/lib/Target/NVPTX NVPTXAsmPrinter.cpp, llvm/test/CodeGen/NVPTX global-cycle.ll global-cycle-alias.ll

[NVPTXAsmPrinter] Allow self-referential device global initializers (#197838)

This change adds support for cyclic device global initializers in NVPTX,
including self-references and references between distinct globals. The
backend’s global-emission ordering walk previously treated every cycle
as an error and aborted with “Circular dependency found in global
variable set.” As a result, valid patterns such as __device__ void
*arr[] = {(void *)"foo", &arr[0]}; were rejected. The NVPTX asm printer
now models initializer dependencies as a graph and emits its strongly
connected components in dependency-first order. Acyclic components are
emitted normally. For cyclic components, it first emits compatible PTX
.extern declarations and then emits the definitions in a valid order.
Cycles that cannot be represented this way, such as cycles containing
only static globals, are still rejected. The forward declarations reuse
the normal definition emitter so their address spaces, alignments,
types, and aggregate layouts match the definitions. Added new tests to
cover self-references, cycles between distinct globals, mixed linkage,
packed aggregates, dependency ordering, and unrepresentable static-only
cycles.
DeltaFile
+235-74llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+79-0llvm/test/CodeGen/NVPTX/global-cycle.ll
+44-0llvm/test/CodeGen/NVPTX/global-cycle-alias.ll
+35-0llvm/test/CodeGen/NVPTX/global-ordering.ll
+15-0llvm/test/CodeGen/NVPTX/packed-aggr.ll
+14-0llvm/test/CodeGen/NVPTX/global-cycle-internal-subcycle.ll
+422-744 files not shown
+454-7510 files

LLVM/project 3b87272llvm/include/llvm/MC MCAsmInfo.h, llvm/lib/MC MCAsmInfo.cpp MCAsmInfoXCOFF.cpp

[MC][NFC] Remove some virtual function from MCAsmInfo (#211858)

The MCAsmInfo vtable is currently 144B (no anchor)/152B (anchor) large
-- and there are 49 of these in an all-target libLLVM.so. Some of these
are not needed or can be easily removed. This removes 5 vtable entries.

Some notes on the remaining functions -- I think this vtable can be
removed entirely without too much effort:

- getStackSection can also be removed, this is ELF-only; unfortunately
  this will require code duplication between AsmPrinter and
  MCELFStreamer.

- getExprForPersonalitySymbol is single-use and two-overrides (Darwin on
  x86-64, AArch64), likely removable.

- shouldOmitSectionDirective has three override modes -- COFF (disallow
  for COMDAT/unique section), AMDGPU (4 .hsa sections), and always-omit
  (NVPTX, SPIRV). This is only called from printSwitchToSection, so COFF

    [20 lines not shown]
DeltaFile
+27-10llvm/lib/MC/MCAsmInfo.cpp
+0-28llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
+1-22llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
+9-10llvm/include/llvm/MC/MCAsmInfo.h
+1-12llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCAsmInfo.cpp
+0-12llvm/lib/MC/MCAsmInfoXCOFF.cpp
+38-948 files not shown
+45-12014 files

LLVM/project 75a1d31llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll bf16.ll

[AMDGPU] revert srl pattern for true16 mode (#208136)

revert https://github.com/llvm/llvm-project/pull/132987.

Revert this patch since it create side effects when register coalescer
join large number of imm `copy`. This patch is on top of
https://github.com/llvm/llvm-project/pull/208045 and share the root
cause
DeltaFile
+6,560-6,119llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+4,715-4,955llvm/test/CodeGen/AMDGPU/bf16.ll
+2,967-2,753llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+2,002-1,834llvm/test/CodeGen/AMDGPU/maximumnum.bf16.ll
+2,002-1,834llvm/test/CodeGen/AMDGPU/minimumnum.bf16.ll
+1,072-1,937llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fmin.ll
+19,318-19,432130 files not shown
+54,048-49,958136 files

LLVM/project 044a1d9lldb/source/Plugins/SymbolFile/DWARF SymbolFileWasm.cpp, lldb/test/Shell/SymbolFile/DWARF wasm-declaration-mangled-name.yaml

[lldb] Recover a WebAssembly function's mangled name from its declaration (#211707)

The Wasm "name" section stores only demangled names, so SymbolFileWasm
recovers each function's mangled name from the DWARF and attaches it to
the code symbol.

Currently, it only does so from a defining DIE, matched by address. When
we only have a declaration DIE (e.g. TU compiled without debug info), it
still carries the linkage name, but wouldn't get associated without the
address.

Match a declaration-only DIE to its code symbol by the demangled name
that the name section already carries, and attach the linkage name that
way.

Assisted-by: Claude
DeltaFile
+89-0lldb/test/Shell/SymbolFile/DWARF/wasm-declaration-mangled-name.yaml
+42-3lldb/source/Plugins/SymbolFile/DWARF/SymbolFileWasm.cpp
+131-32 files

LLVM/project 5482f92clang/lib/CodeGen CGOpenMPRuntime.cpp, clang/test/OpenMP target_map_nested_ptr_member_mapper_codegen.cpp

[OpenMP] Propagate PRESENT to pointee entries in mapper codegen

Extend map-type-modifier propagation in emitUserDefinedMapper to the PRESENT
modifier, but only for entries that have an attach ptr (the pointee data, whose
storage differs from the struct's own). A present modifier on the outer clause
must require that pointee to be present on the device.

This is gated on a new PropagatePresentToPointee argument, which Clang sets from
CGM.getLangOpts().OpenMP >= 60. Before 6.0 the present modifier is treated as
not applying to the pointee: the spec committee confirmed the divergence
between the present motion modifier (to/from) and the present map-type modifier
(map) was unintentional, to be fixed as an OpenMP 6.0 erratum. Only propagation
is gated; present written directly in a mapper's own clause applies at all
versions.

A TODO notes PRESENT should also propagate to the struct's own members, which
is blocked while pointer members use PTR_AND_OBJ.

Update the present-check tests to their final 6.0-gated behavior.

    [2 lines not shown]
DeltaFile
+36-11llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+10-17offload/test/mapping/mapper_target_update_present_ptee.c
+14-13offload/test/mapping/mapper_map_mbr_then_present_mbr_ptee.c
+13-4llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+6-9clang/test/OpenMP/target_map_nested_ptr_member_mapper_codegen.cpp
+12-3clang/lib/CodeGen/CGOpenMPRuntime.cpp
+91-576 files

LLVM/project eedb658llvm/lib/Transforms/Scalar ConstraintElimination.cpp, llvm/test/Transforms/ConstraintElimination loops-bottom-tested-pointer-cmps.ll induction-condition-in-loop-exit-latch-counted.ll

[ConstraintElim] use condition from latch in addInfoForInductions. (#210984)

Also use condition in latch to inject %iv <= %B and co into the header,
if the latch condition compares a post-inc IV like %iv + %step != %B.

This allows reasoning about loops that have been rotated before
ConstraintElimination, e.g. during the LTO phase or Swift where the
frontend already rotates loops before generating LLVM IR.

Alive2 Proof for injecting %iv <= B from %iv + %step != %B in latch:
https://alive2.llvm.org/ce/z/pH8Czb

This enables a number of additional simplifications in practice
(https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/736).

It comes with a compile-time impact when doing LTO, as all loops will be
rotated
and will hit the new code path.
* stage1-ReleaseThinLTO: +0.08%

    [9 lines not shown]
DeltaFile
+19-5llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+6-9llvm/test/Transforms/ConstraintElimination/loops-bottom-tested-pointer-cmps.ll
+4-8llvm/test/Transforms/ConstraintElimination/induction-condition-in-loop-exit-latch-counted.ll
+29-223 files

LLVM/project 2ace2c8clang/lib/CodeGen CGOpenMPRuntime.cpp, clang/test/OpenMP target_map_nested_ptr_member_mapper_codegen.cpp declare_mapper_codegen.cpp

[OpenMP][Clang] Enable ATTACH-style maps for mappers.

Track per-entry attach-ptr info (HasAttachPtr) through mapper codegen so that
emitUserDefinedMapper does not add a new outer MEMBER_OF to pointee/combined
entries (which occupy different storage than the struct) or to ATTACH entries.
Clang and the MLIR translator populate the per-entry array in parallel with the
other MapInfosTy arrays.

Address review:
  - Rename MapSkipMemberOfArrayTy to MapHasAttachPtrArrayTy to match the
    HasAttachPtr field it backs.
  - Restructure the emitUserDefinedMapper comment into a bulleted (*)/(**)/(***)
    list keyed to the example entries.
  - Reword the Clang comments: HasAttachPtr marks pointee entries that have a
    base attach-ptr; a combined entry has a base attach-ptr if its constituents
    do; cross-reference emitUserDefinedMapper for the MEMBER_OF rationale.
  - Update the moved present-check tests to their now-correct behavior (the
    attach-style maps make the inbounds present checks pass and remove the
    "explicit extension" errors).

    [2 lines not shown]
DeltaFile
+196-160clang/test/OpenMP/target_map_nested_ptr_member_mapper_codegen.cpp
+68-60clang/test/OpenMP/declare_mapper_codegen.cpp
+56-15llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+65-5clang/lib/CodeGen/CGOpenMPRuntime.cpp
+18-24offload/test/mapping/mapper_enter_data_always_present_ptee.c
+14-26offload/test/mapping/mapper_map_mbr_ptee_then_present_mbr_ptee.c
+417-2909 files not shown
+487-35915 files

LLVM/project 8231fdalldb/include/lldb/Utility FileSpec.h, lldb/source/API SBData.cpp SBFileSpec.cpp

[lldb] Remove ConstString from FileSpec (#211394)

This commit completely removes ConstString from FileSpec, replacing it
with llvm::SmallString instead.

I considered combining the directory and the filename together into one
field, but then it became impossible to distinguish between a
partially-constructed FileSpec's last directory and a fully-constructed
FileSpec's filename.

The sizes of the SmallStrings are somewhat arbitrary. I tested out a few
other configurations on my machine locally and this yielded the best
memory/runtime tradeoffs.

I measured the impact of this change in two ways:
(1) Runtime performance

I measured the runtime impact by using LLDB's statistics with `stat
enable` and `stat dump -f` (forcing the parsing of symbols) for a debug

    [15 lines not shown]
DeltaFile
+30-28lldb/source/Utility/FileSpec.cpp
+6-4lldb/include/lldb/Utility/FileSpec.h
+2-2lldb/source/Target/Statistics.cpp
+1-0lldb/source/API/SBData.cpp
+1-0lldb/source/API/SBFileSpec.cpp
+1-0lldb/source/API/SBLaunchInfo.cpp
+41-349 files not shown
+50-3415 files

LLVM/project de4b1f5clang/lib/Parse ParseDecl.cpp, clang/lib/Sema DeclSpec.cpp

[Clang] Avoid querying tag definitions for invalid DeclSpecs (#210085)

Guard hasTagDefinition() against invalid type-specifier state so
recovery from invalid auto/tag combinations does not assert.
Fixes #210014

---------

Signed-off-by: Osama Abdelkader <osama.abdelkader at gmail.com>
DeltaFile
+7-1clang/lib/Parse/ParseDecl.cpp
+5-0clang/test/SemaCXX/auto-cxx0x.cpp
+1-1clang/lib/Sema/DeclSpec.cpp
+13-23 files

LLVM/project 92c76ablibc/src/stdlib/linux realpath.cpp, libc/test/src/stdlib realpath_test.cpp

[libc][realpath] Follow symlinks
DeltaFile
+48-38libc/src/stdlib/linux/realpath.cpp
+26-0libc/test/src/stdlib/realpath_test.cpp
+74-382 files

LLVM/project 4d549d9clang/test/OpenMP target_map_nested_ptr_member_mapper_codegen.cpp target_map_array_section_of_structs_with_nested_mapper_codegen.cpp, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

[OpenMP] Propagate ALWAYS/DELETE/CLOSE map-type modifiers to mapper entries

When a map clause uses a user-defined mapper, the map-type-modifying bits
(ALWAYS, DELETE, CLOSE) on the outer clause must apply to each map the mapper
inserts (OpenMP 6.0:281:34). Propagate them in emitUserDefinedMapper by OR-ing
the imported modifier bits into each pushed component, except ATTACH entries
(ATTACH|ALWAYS is reserved for attach(always) and the other bits are
meaningless for ATTACH).

PRESENT is intentionally not propagated here yet (a TODO notes it is handled in
a follow-on, since it requires distinguishing pointee entries from the struct's
own storage).

Add tests:
  - offload mapper_map_always_from.c: ALWAYS forces a member copy-back that the
    ref count would otherwise suppress.
  - offload Fortran target-custom-mapper-delete.f90: DELETE is propagated to the
    mapper's member entry so it is removed by target exit data.

Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
DeltaFile
+152-136clang/test/OpenMP/target_map_nested_ptr_member_mapper_codegen.cpp
+87-77clang/test/OpenMP/target_map_array_section_of_structs_with_nested_mapper_codegen.cpp
+87-77clang/test/OpenMP/target_map_array_of_structs_with_nested_mapper_codegen.cpp
+50-0offload/test/offloading/fortran/target-custom-mapper-delete.f90
+38-2llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+39-0offload/test/mapping/mapper_map_always_from.c
+453-2925 files not shown
+501-32211 files

LLVM/project 86c2f95llvm/include/llvm/CodeGen BreakFalseDeps.h, llvm/lib/Target/AArch64 AArch64.h SVEShuffleOpts.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+8-5llvm/lib/Target/AArch64/AArch64.h
+3-3llvm/lib/Target/AArch64/SVEShuffleOpts.cpp
+3-2llvm/lib/Target/Lanai/Lanai.h
+3-1llvm/lib/Target/AArch64/AArch64PassRegistry.def
+2-1llvm/lib/Target/MSP430/MSP430.h
+1-1llvm/include/llvm/CodeGen/BreakFalseDeps.h
+20-135 files not shown
+25-1811 files

LLVM/project b0c727bllvm/include/llvm/Analysis FunctionPropertiesAnalysis.h, llvm/include/llvm/CodeGen BreakFalseDeps.h

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

Created using spr 1.3.7

[skip ci]
DeltaFile
+6-4llvm/lib/Target/AArch64/AArch64.h
+3-2llvm/lib/Target/Lanai/Lanai.h
+2-1llvm/lib/Target/MSP430/MSP430.h
+1-1llvm/lib/Target/X86/X86.h
+1-1llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h
+1-1llvm/include/llvm/CodeGen/BreakFalseDeps.h
+14-103 files not shown
+17-139 files

LLVM/project e200ea6flang/include/flang/Parser parse-tree.h dump-parse-tree.h, flang/lib/Parser unparse.cpp

[flang][semantic] parser node types and rewrite for assumed-shape-bounds-spec (#211690)
DeltaFile
+53-0flang/lib/Semantics/resolve-names-utils.cpp
+43-0flang/test/Semantics/declaration-assumed-array-bounds.f90
+6-4flang/include/flang/Parser/parse-tree.h
+4-0flang/lib/Parser/unparse.cpp
+1-0flang/include/flang/Parser/dump-parse-tree.h
+107-45 files

LLVM/project f348f98llvm/include/llvm/CodeGen BreakFalseDeps.h, llvm/include/llvm/Transforms/Scalar AlignmentFromAssumptions.h LogicalSROA.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+6-4llvm/lib/Target/AArch64/AArch64.h
+3-2llvm/lib/Target/Lanai/Lanai.h
+2-1llvm/lib/Target/MSP430/MSP430.h
+1-1llvm/include/llvm/CodeGen/BreakFalseDeps.h
+1-1llvm/include/llvm/Transforms/Scalar/AlignmentFromAssumptions.h
+1-1llvm/include/llvm/Transforms/Scalar/LogicalSROA.h
+14-103 files not shown
+17-139 files

LLVM/project 15bb4a9llvm/test/CodeGen/PowerPC ppcf128-constrained-fp-intrinsics.ll, llvm/test/Transforms/EarlyCSE replace-calls-def-attrs.ll

[IR] Make semantics of strictfp consistent v2 (#211769)

Changes: The patch was originally landed as af0c933e (#209465), but
there was an issue with strictfp functions being inlined into
non-strictfp functions. The issue has since been resolved by a2b42b10a
([IR] Reject inlining strictfp alwaysinline callee into non-strictfp
caller, #210701) and the re-land is identical.

Although the section on constrainedfp in the LangRef clearly states "All
function definitions that use constrained floating point intrinsics must
have the strictfp attribute", indicating that a function with strictfp
calls must be marked with strictfp, the general description of strictfp
does not specify this. Refine its semantics and make it so, eliminating
the inconsistency.
DeltaFile
+35-32llvm/test/Transforms/EarlyCSE/replace-calls-def-attrs.ll
+25-25mlir/test/Target/LLVMIR/llvmir-intrinsics.mlir
+22-18llvm/test/Transforms/InstCombine/erf.ll
+16-14llvm/test/Transforms/SimplifyCFG/X86/merge-compatible-invokes-of-landingpad.ll
+24-0llvm/unittests/IR/VerifierTest.cpp
+2-14llvm/test/CodeGen/PowerPC/ppcf128-constrained-fp-intrinsics.ll
+124-10317 files not shown
+169-13623 files

LLVM/project 6edec6dllvm/lib/Transforms/Vectorize VPlan.h, llvm/test/Transforms/LoopVectorize interleaved-accesses.ll induction.ll

[VPlan] Endow DerivedIV with IRFlags (#205908)

Endow DerivedIV with no-wrap flags that are used in all adds and muls:
the FP induction can still get the FastMathFlags from the FPBinOp. The
patch changes vputils::createScalarIVSteps where no-wrap flags are
applicable. GEP no-wrap flags are missing nearly everywhere, and is left
to an exercise for a follow-up.

Proof: https://alive2.llvm.org/ce/z/rHtwEH +
https://alive2.llvm.org/ce/z/h297HG for a larger UF on one test
DeltaFile
+358-0llvm/test/Transforms/LoopVectorize/VPlan/derivediv-wrapflags.ll
+25-27llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll
+12-10llvm/lib/Transforms/Vectorize/VPlan.h
+10-10llvm/test/Transforms/LoopVectorize/induction.ll
+9-9llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-derived-ivs.ll
+7-7llvm/test/Transforms/LoopVectorize/AArch64/sve-interleaved-accesses.ll
+421-6357 files not shown
+583-21563 files

LLVM/project f1b04ddllvm/lib/TargetParser AMDGPUTargetParser.cpp, llvm/unittests/TargetParser TargetParserTest.cpp

AMDGPU: Reject unrecognized amdgpu subarch in TargetID parsing

A bare "amdgpu" or an unrecognized "amdgpu<x>" both parse to the
amdgpu arch with no subarch; TargetID::parse previously accepted them,
taking a named processor and ignoring the missing subarch.

Reject triples with no subarch, unless it uses the legacy spelling.
This is another workaround for Triple not having a proper unknown value
for subarches.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+9-0llvm/unittests/TargetParser/TargetParserTest.cpp
+4-0llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+13-02 files

LLVM/project ea1728alldb/source/Plugins/ObjectFile/wasm ObjectFileWasm.cpp, lldb/test/Shell/ObjectFile/wasm wasm-formatter-sections.yaml

[lldb] Classify embedded formatter sections in WebAssembly objects (#211704)

A `section` attribute on a data variable is placed in a named data
segment on WebAssembly rather than a top-level custom section, so the
.lldbformatters and .lldbsummaries segments that carry embedded data
formatters were classified as plain data. The data-formatter loader
looks these up by section type, so embedded summaries and synthetic
child providers were never registered for a Wasm module.

Map the two formatter segment names to their section types when creating
sections, and place the segments in linear memory like other data so
their contents resolve. This mirrors the ELF and Mach-O object file
plugins.

Assisted-by: Claude
DeltaFile
+72-0lldb/test/Shell/ObjectFile/wasm/wasm-formatter-sections.yaml
+24-8lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
+96-82 files

LLVM/project 6b3268allvm/lib/Target/AMDGPU AMDGPUISelDAGToDAG.cpp

AMDGPU: Avoid dropping poison when extracting a high element

Haven't found a case where this matters, but I want to stop finding
this instance of the is-undef-get-undef pattern.
DeltaFile
+4-1llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+4-11 files

LLVM/project 9195346llvm/lib/TargetParser AMDGPUTargetParser.cpp, llvm/test/MC/AMDGPU amdgcn-target-directive-subarch-cpu-field.s

AMDGPU: Validate processor is consistent with subarch in TargetID parsing (#211828)

TargetID::parse checked that a named processor was a recognized GPU, but
not that it was consistent with the triple's subarch. A target id like
"amdgpu9.00-amd-amdhsa--gfx803" was accepted even though gfx803 does not
belong to the amdgpu9.00 subarch, silently taking the processor and
ignoring the mismatched subarch.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+18-0llvm/unittests/TargetParser/TargetParserTest.cpp
+8-3llvm/test/MC/AMDGPU/amdgcn-target-directive-subarch-cpu-field.s
+3-2llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+29-53 files

LLVM/project 9ea470dllvm/lib/Target/AMDGPU AMDGPUInstructions.td

AMDGPU: Don't pack a build_vector with an undef/poison lane

Once ISD::POISON is legal it reaches isel and is treated as canonical, so
is_canonicalized_2<build_vector> matched build_vector<x, poison> and selected
a v_pack for a don't-care high lane. Avoids regressions in future patches.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+7-0llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
+7-01 files

LLVM/project 2863bc1clang/test/SemaHIP amdgpu-feature-builtins-return-type-deduction.hip amdgpu-builtin-in-lambda.hip

clang/AMDGPU: Migrate cc1 tests to subarch triples (8)

Rewrite SemaHIP cc1 test RUN lines to the new subarch triple form,
dropping the redundant -target-cpu.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+2-2clang/test/SemaHIP/amdgpu-feature-builtins-return-type-deduction.hip
+2-2clang/test/SemaHIP/amdgpu-builtin-in-lambda.hip
+2-2clang/test/SemaHIP/amdgpu-builtin-in-lambda-with-unsupported-attribute.hip
+2-2clang/test/SemaHIP/builtins-amdgcn-gfx1250-cooperative-atomics-templated.hip
+1-1clang/test/SemaHIP/amdgpu-flat-atomic-fmin-err.hip
+1-1clang/test/SemaHIP/amdgpu-gfx950-load-to-lds.hip
+10-1015 files not shown
+25-2521 files

LLVM/project 47a837bclang/test/CodeGenCXX amdgpu-float16.cpp sret_cast_with_nonzero_alloca_as.cpp, clang/test/Misc backend-resource-limit-diagnostics.hip amdgcn.languageOptsOpenCL.cl

clang/AMDGPU: Migrate cc1 tests to subarch triples (7)

Rewrite the remaining small test directories (CodeGenCXX, Misc, Sema,
SemaCUDA, SemaCXX) cc1 RUN lines to the new subarch triple form, dropping
the redundant -target-cpu.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+4-4clang/test/CodeGenCXX/amdgpu-float16.cpp
+2-2clang/test/SemaCUDA/openmp-target.cu
+2-2clang/test/Sema/sizeof-struct-non-zero-as-member.cl
+1-1clang/test/Misc/backend-resource-limit-diagnostics.hip
+1-1clang/test/CodeGenCXX/sret_cast_with_nonzero_alloca_as.cpp
+1-1clang/test/Misc/amdgcn.languageOptsOpenCL.cl
+11-115 files not shown
+16-1611 files

LLVM/project 2ce871eclang/test/CIR/CodeGenHIP builtins-amdgcn-vi-f16.hip attr-target-amdgpu.hip

clang/AMDGPU: Migrate cc1 tests to subarch triples (6)

Rewrite CIR/CodeGenHIP cc1 test RUN lines to the new subarch triple form,
dropping the redundant -target-cpu, and regenerate autogenerated CHECK
lines.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+24-24clang/test/CIR/CodeGenHIP/builtins-amdgcn-vi-f16.hip
+12-12clang/test/CIR/CodeGenHIP/attr-target-amdgpu.hip
+9-9clang/test/CIR/CodeGenHIP/target-features.hip
+6-6clang/test/CIR/CodeGenHIP/builtins-amdgcn-gfx1250.hip
+6-6clang/test/CIR/CodeGenHIP/builtins-amdgcn-image.hip
+6-6clang/test/CIR/CodeGenHIP/builtins-amdgcn.hip
+63-636 files not shown
+89-8912 files

LLVM/project d1fd9c6clang/test/OpenMP openmp-read-only-feature.c ompx_attributes_codegen.cpp

clang/AMDGPU: Migrate cc1 tests to subarch triples (5)

Rewrite OpenMP cc1 test RUN lines to the new subarch triple form,
dropping the redundant -target-cpu, and regenerate autogenerated CHECK
lines. Tests that intentionally assert the "target-cpu" attribute are
left unchanged.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+2-2clang/test/OpenMP/openmp-read-only-feature.c
+2-2clang/test/OpenMP/ompx_attributes_codegen.cpp
+1-1clang/test/OpenMP/dims_modifier_messages.cpp
+1-1clang/test/OpenMP/metadirective_device_arch_codegen.cpp
+1-1clang/test/OpenMP/metadirective_device_isa_codegen_amdgcn.cpp
+1-1clang/test/OpenMP/target_num_teams_num_threads_attributes.cpp
+8-82 files not shown
+10-108 files

LLVM/project befa7e2llvm/lib/Target/AMDGPU AMDGPUISelDAGToDAG.cpp SIISelLowering.cpp

AMDGPU: Handle ISD::POISON in fp16SrcZerosHighBits and isCanonicalized (#211831)
DeltaFile
+2-0llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+2-0llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+4-02 files