LLVM/project 906654c — clang/lib/CodeGen CGOpenMPRuntime.cpp, clang/lib/Sema SemaOpenMP.cpp

[Clang][OpenMP] Allow array shaping as the base of array sections in target update (#244591)

Fixes #136294

`target update from((([nx][ny+2])a)[0:nx][1])`, the array shaping
example from the OpenMP Examples, fails with "array shaping operation is
not allowed here": the shaped expression only has a placeholder type, so
there is no array to take a section of.

The shaping expression now carries the array type the spec gives it, and
sections use it like a declared array's type, so the existing checks and
non-contiguous codegen apply as they are. The example also needs two
sections of one variable in a motion clause not to hit the 4.5 map rule,
and `target update` to treat a section it cannot prove contiguous as
non-contiguous.

Two neighbouring bugs surfaced on the way and are fixed here as well:
the size of a `depend` or `affinity` section whose elements are variable
length arrays stopped one element into the last row, and a shaping

    [2 lines not shown]
DeltaFile
+1,626-1,617clang/test/OpenMP/task_codegen.cpp
+364-0clang/test/OpenMP/GH136294.c
+141-40clang/lib/Sema/SemaOpenMP.cpp
+60-14clang/lib/CodeGen/CGOpenMPRuntime.cpp
+55-8clang/test/OpenMP/target_update_to_messages.cpp
+53-7clang/test/OpenMP/target_update_from_messages.cpp
+2,299-1,68613 files not shown
+2,452-1,72019 files

LLVM/project 2a978b5 — libcxx/docs/ReleaseNotes 24.rst, libcxx/include/__random discrete_distribution.h

[libc++] Fix discrete_distribution probability rounding

discrete_distribution::probabilities() computes the final probability as
one minus the last cumulative probability,
producing a negative value when rounding pushes that cumulative probability
above one.

The standard specifies p_k = w_k / S in
[rand.dist.samp.discrete]/2
and requires probabilities() to return p_k in
[rand.dist.samp.discrete]/12,
so a zero weight must have zero probability.

Accumulate the original weights before normalizing the cumulative sums to
keep them in [0, 1] and preserve trailing zero probabilities.
Since each cumulative weight is bounded by the total computed in the same
order, dividing by that total keeps the last cumulative probability at most
one, so subtracting it from one cannot produce a negative probability.

Assisted By: GPT-6.1 Sol
DeltaFile
+24-1libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/ctor_iterator.pass.cpp
+7-0libcxx/docs/ReleaseNotes/24.rst
+3-2libcxx/include/__random/discrete_distribution.h
+34-33 files

LLVM/project 088b8d8 — clang/lib/Headers acev1intrin.h, llvm/lib/Target/X86 X86ISelLowering.cpp X86LowerTileCopy.cpp

[X86] Add ACE v1 (AI Compute Extensions) support (#208408)

ACE v1 introduces new tile-based matrix operations with fixed 16x64 tile
dimensions (Palette 2), unlike AMX's configurable dimensions.

Key features:
- New __acetile type with fixed 16x64 dimensions
- __tile_ace_* intrinsics for ACE tile operations
- Outer product instructions: TOP4BUUD, TOP4BUSD, TOP4BSSD, TOP4BSUD,
TOP2BF16PS
- Mixed precision FP8 instructions: TOP4MX variants
- Tile movement: TILEMOVROW, TILEMOVCOL for ZMM<->tile transfers
- BSR (Block Scale Register) operations for scaling factors
- ACE tile spill/reload using TILEMOVROW + VMOVUPS row-by-row (ACE
doesn't have TILELOADD/TILESTORED instructions)

Backend changes:
- X86LowerTileCopy handles ACE tile copies
- X86PreTileConfig/X86FastPreTileConfig for ACE register allocation

    [10 lines not shown]
DeltaFile
+898-0clang/lib/Headers/acev1intrin.h
+470-0llvm/test/CodeGen/X86/ACEV1/acev1-intrinsics.ll
+311-0llvm/lib/Target/X86/X86InstrACE.td
+262-0llvm/test/MC/Disassembler/X86/acev1.txt
+210-51llvm/lib/Target/X86/X86LowerTileCopy.cpp
+223-3llvm/lib/Target/X86/X86ISelLowering.cpp
+2,374-5462 files not shown
+5,714-16368 files

LLVM/project 388490c — clang/test/SemaTemplate crash-GH114174.cpp

[clang][Sema] Add regression test for GH114174 (#233663)

PR #143423 fixed the assertion failure reported in #114174, but did not
add coverage for the original reproducer

Add a SemaTemplate regression test that verifies the invalid program
emits the expected diagnostics without crashing

Fixes #114174
DeltaFile
+22-0clang/test/SemaTemplate/crash-GH114174.cpp
+22-01 files

LLVM/project eef1d79 — libcxx/docs/ReleaseNotes 24.rst, libcxx/include/__random discrete_distribution.h

[libc++] Fix discrete_distribution probability rounding

Normalizing weights before accumulating them could make discrete_distribution::probabilities() return a negative probability for a trailing zero weight. [rand.dist.samp.discrete] requires probabilities() to return p_k = w_k / S, so a zero weight must have zero probability. Accumulate the original weights before normalizing the cumulative sums to keep them in [0, 1] and preserve trailing zero probabilities.
DeltaFile
+23-0libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/ctor_iterator.pass.cpp
+7-0libcxx/docs/ReleaseNotes/24.rst
+3-2libcxx/include/__random/discrete_distribution.h
+33-23 files

LLVM/project 89911a7 — llvm/tools/llvm-size llvm-size.cpp

[llvm-size] Refactor output formatting into SizePrinter classes (NFC) (#243385)

Introduce a class-based SizePrinter abstraction (SummarySizePrinter,
BerkeleySizePrinter, SysVSizePrinter, DarwinSizePrinter) to encapsulate
format-specific state and output logic instead of branching on
OutputFormat across printObject and printObjectSectionSizes.

Move per-run state (HeaderPrinted and totals) from file-scope globals
into printer instances, preparing llvm-size for cleanly adding
additional output formats such as GNU (-G / --format=gnu) and JSON.

Assisted-by: Gemini
DeltaFile
+326-256llvm/tools/llvm-size/llvm-size.cpp
+326-2561 files

LLVM/project 4ca898e — flang/lib/Semantics resolve-directives.cpp

[flang][OpenACC] Remove unused members in AccAttributeVisitor (NFC) (#246530)

dataMappingAttributeFlags was added on July 26, 2020 in commit
ff25b2da2ab9049e154cc8b9af06a24f79a74209 without any readers.

accDataMvtFlags was added on June 28, 2023 in commit
eeba037e0bb6bf0686eca73f4b4cf5eaf573499b without any readers.

Assisted-by: Antigravity
DeltaFile
+0-8flang/lib/Semantics/resolve-directives.cpp
+0-81 files

LLVM/project 7ff2f1b — clang/lib/Analysis/LifetimeSafety LifetimeAnnotations.cpp

[LifetimeSafety][NFC] Check names before namespaces in lifetime annotations (#246492)
DeltaFile
+6-6clang/lib/Analysis/LifetimeSafety/LifetimeAnnotations.cpp
+6-61 files

LLVM/project 0b57d27 — clang/lib/Analysis/LifetimeSafety Dataflow.h

[LifetimeSafety][NFC] Index the dataflow block states by block ID (#246491)
DeltaFile
+16-13clang/lib/Analysis/LifetimeSafety/Dataflow.h
+16-131 files

LLVM/project 53efc96 — flang/lib/Semantics resolve-names.cpp, flang/test/Semantics procinterface07.f90 procinterface06.f90

[flang] Reject interface name declared by a later PROCEDURE statement (#232928)

C1515 requires that a name used as a procedure interface, when it is
itself declared by a procedure declaration statement, be declared before
that use. Name resolution creates a placeholder symbol for a forward
reference and only checks it after the whole specification part, by
which point the later PROCEDURE statement has given it an explicit
interface, so the program was accepted.

In the deferred check, report an error when the interface name resolves
to a procedure entity whose declaration comes after the use. Forward
references to interface bodies and module procedures are still accepted.

Fixes #229229
DeltaFile
+50-0flang/test/Semantics/procinterface06.f90
+38-0flang/test/Semantics/procinterface07.f90
+27-1flang/lib/Semantics/resolve-names.cpp
+115-13 files

LLVM/project 6e9a3aa — llvm/lib/Target/AMDGPU AMDGPUCoExecInfo.h AMDGPUCoExecSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir

[AMDGPU] Fix gfx950/gfx942 v_pk f32 instr co-exec slot

On gfx950/gfx942, v_pk f32 instrs can issue only after the MFMA's own
cycles (in hardware cycles):
  XDL/SMFMAC: 8 cycles
  XDL2x/SMFMAC2x: 12 cycles
  SGEMM/DGEMM: 8 cycles

Currently they are categorized as VALU. This is wrong for
XDL/SMFMAC/XDL2x/SMFMAC2x, since VALU can issue within the MFMA's own
cycles.

Fix this by adding a PK_F32 CoExecMask bit, a PK_F32 slot in each MFMA
row, and a PackedF32VALU InstructionFlavor. Classify the following
instrs as PackedF32VALU on subtargets with packed FP32 ops (gfx90a,
gfx942, gfx950):

V_PK_{ADD,FMA,MUL}_F32, V_PK_MOV_B32.


    [3 lines not shown]
DeltaFile
+35-21llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+23-21llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+16-8llvm/lib/Target/AMDGPU/AMDGPUCoExecInfo.h
+1-1llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+75-514 files

LLVM/project 022d631 — llvm/lib/Target/AMDGPU AMDGPUCoExecSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir

[AMDGPU] Fix gfx950/gfx942 TRANS co-execute slot

On gfx950/gfx942, fix TRANS co-exec slot to be same as VALU.

Excluded from this commit:

  TRANS on gfx950 (in unit of hardware cycle):
    Reciprocal throughput (per SIMD):
      f32/f16: 8
      f64:     16
    Def-to-use latency:
      f32/f16: 12 to a non-TRANS reader, 8 to a TRANS reader
      f64:     20 to a non-TRANS reader, 16 to a TRANS reader
    Blocks this wave's issue for:
      f32/f16: 8
      f64:     16
  On gfx942, f32/f16 have the same numbers as f64 above.

Currently, GCNHazardRecognizer inserts the correct s_nop between a TRANS

    [4 lines not shown]
DeltaFile
+1-1llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+1-1llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+2-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+4-23 files

LLVM/project 3d1dbf8 — llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir

[AMDGPU] Precommit TRANS co-exec tests (NFC)

Add a gfx950 coexec scheduler case where a v_exp_f32 and a v_add_f32
compete for the window of an XDL2x (v_mfma_f32_16x16x32_bf16) MFMA.
No MFMA row allows TRANS so far, so the v_exp_f32 issues after the
MFMA window.

Assisted-by: Claude Opus 5.5
DeltaFile
+17-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+17-01 files

LLVM/project 9833b0c — llvm/lib/CodeGen/SelectionDAG LegalizeVectorTypes.cpp, llvm/test/CodeGen/SPARC vselect-mask-tree-true.ll

[SelectionDAG] Use target boolean for all-true leaf in convertMaskTree (#246219)

convertMaskTreeImpl, used by WidenVSELECTMask, materialized an all-ones
BUILD_VECTOR leaf with getAllOnesConstant. That is only a valid "true"
for ZeroOrNegativeOne vector booleans. On targets using ZeroOrOne vector
booleans, such as SPARC, the -1 later leaked into the result, e.g.
select(shuffle(a < b, true), 1, 0) returned -1 in the lanes coming from
the constant-true operand.

Use getBoolConstant instead. The resulting constant is still invariant
under sign-extend/truncate, so the leaf stays type-lenient.

Fixes #244589

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+62-0llvm/test/CodeGen/SPARC/vselect-mask-tree-true.ll
+3-2llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+65-22 files

LLVM/project e253b76 — flang/include/flang/Optimizer/Analysis AliasAnalysis.h, flang/lib/Optimizer/Analysis AliasAnalysis.cpp

[flang] Fix FIR alias analysis of arrays of derived types (#245359)

The composite rule in fir::AliasAnalysis::alias makes the address of a
derived type object alias the descriptor of an allocatable or pointer
component in it. It recognized only references to scalar derived type
objects. An array of such objects, the descriptor value of one, or a
polymorphic object did not alias the descriptor of a component of an
element. A call taking the array was then NoModRef for that descriptor,
and LICM hoisted a load of the descriptor out of a loop across the call.
The rule for pointer dummy arguments had the same gap.

Use a predicate that accepts all of them. Since descriptor values are
now covered, the data of an allocatable or pointer array would alias its
own descriptor, which would add temporaries to FORALL pointer
assignments. With the predicate alone, two existing tests in flang/test
fail that way:

- HLFIR/order_assignments/forall-pointer-assignment-scheduling.f90:
test_no_conflict and test_null_no_conflict assign a pointer component of

    [19 lines not shown]
DeltaFile
+475-8flang/test/Analysis/AliasAnalysis/ptr-component.fir
+71-15flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
+84-0flang/test/Transforms/licm.fir
+13-6flang/include/flang/Optimizer/Analysis/AliasAnalysis.h
+643-294 files

LLVM/project eaa6223 — llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir, llvm/unittests/Target/AMDGPU MFMACoExecRules.cpp

[AMDGPU] Precommit packed F32 co-exec tests (NFC)

Add a gfx950 coexec scheduler case where a v_pk_add_f32 and a v_add_f32
compete for the window of an XDL2x (v_mfma_f32_16x16x32_bf16) MFMA, and
a unit test for the co-execution class of the packed F32 instructions
and v_pk_add_f16. Packed F32 VALU is treated as plain VALU so far.

Assisted-by: Claude Opus 5.5
DeltaFile
+35-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+17-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+52-02 files

LLVM/project 9f60eef — llvm/lib/Target/AMDGPU AMDGPUCoExecInfo.h AMDGPUTargetMachine.cpp, llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir coexec-sched-warning.mir

[AMDGPU] Add MFMA co-exec rows for gfx942 MFMAs

Add MFMA co-exec rows for gfx942 MFMAs for both gfx942 and gfx950.
Gfx950 support gfx942 mfma opcodes as well as others.

Add rows for:

XDL_2Pass:
  v_mfma_f32_4x4x4_16b_{f16,bf16}
  v_mfma_i32_4x4x4_16b_i8

XDL_4Pass:
  v_mfma_f32_16x16x16_{f16,bf16}
  v_mfma_i32_16x16x32_i8
  v_mfma_f32_16x16x8_xf32 (gfx942 only)
  v_mfma_f32_16x16x32_{bf8,fp8}_{bf8,fp8}

XDL_8Pass:
  v_mfma_f32_16x16x4_4b_{f16,bf16}

    [43 lines not shown]
DeltaFile
+48-13llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+15-13llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+6-5llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+3-3llvm/lib/Target/AMDGPU/AMDGPUCoExecInfo.h
+2-2llvm/test/CodeGen/AMDGPU/coexec-sched-warning.mir
+1-1llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+75-372 files not shown
+77-398 files

LLVM/project 5c3700a — llvm/test/CodeGen/AMDGPU coexec-sched-warning.mir coexec-mfma-interleave-gfx942.mir, llvm/unittests/Target/AMDGPU MFMACoExecRules.cpp

[AMDGPU] Precommit legacy MFMA co-exec tests (NFC)

Add coexec scheduler cases for a gfx940 SMFMAC
(v_smfmac_f32_16x16x32_f16) on gfx950 and for a DGEMM
(v_mfma_f64_16x16x4_f64) on gfx942 and gfx950, a gfx942 RUN line in
coexec-sched-warning.mir, and unit test rows for one MFMA per legacy
variant on gfx950 plus v_mfma_f64_16x16x4_f64 on gfx942.

The legacy variants fall back to a permissive window that lets anything
co-execute. v_mfma_f64_16x16x4_f64 uses its gfx950 rule on gfx942 as
well, and gfx942 does not enable the co-exec model yet, so it warns and
its scheduler case runs without the model.

Assisted-by: Claude Opus 5.5
DeltaFile
+64-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+49-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx942.mir
+11-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+2-0llvm/test/CodeGen/AMDGPU/coexec-sched-warning.mir
+126-04 files

LLVM/project 26305ab — llvm/lib/Target/AMDGPU AMDGPUCoExecSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir

[AMDGPU] Fix gfx950 MFMA co-exec rows for XDL2x_8Pass, SMFMAC2x, DGEMM

Fix the co-exec rows for the following instructions:

XDL2x_8Pass:
  v_mfma_f32_32x32x16_f16
  v_mfma_f32_32x32x16_bf16
  v_mfma_i32_32x32x32_i8
  v_mfma_f32_32x32x64_f8f6f4 and v_mfma_scale_f32_32x32x64_f8f6f4
  with no fp8/bf8 operand

SMFMAC2x_4Pass:
  v_smfmac_f32_16x16x64_f16
  v_smfmac_f32_16x16x64_bf16
  v_smfmac_i32_16x16x128_i8
  v_smfmac_f32_16x16x128_{bf8,fp8}_{bf8,fp8}

SMFMAC2x_8Pass:
  v_smfmac_f32_32x32x32_f16

    [8 lines not shown]
DeltaFile
+11-5llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+4-4llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+1-1llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+16-103 files

LLVM/project d8a2726 — llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir, llvm/unittests/Target/AMDGPU MFMACoExecRules.cpp

[AMDGPU] Precommit gfx950 MFMA co-exec row tests (NFC)

Add a gfx950 coexec scheduler case for v_smfmac_f32_16x16x64_f16, and a
unit test that checks the first co-exec stage of SALU, DS and VMEM, VALU
and the next MFMA for one MFMA per gfx950 variant.

Assisted-by: Claude Opus 5.5
DeltaFile
+37-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+17-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+54-02 files

LLVM/project d42f23e — llvm/lib/Target/AMDGPU VOPInstructions.td VOP3PInstructions.td, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.h AMDGPUBaseInfo.cpp

[AMDGPU] Describe MFMAs with a variant in MAIInstInfoTable (NFC)

- Add an MFMAVariant enum. Each MFMA pseudo gets its variant from
  MAIInstInfoTable, a TableGen GenericTable. Each real MFMA opcode
  inherits the variant of its pseudo through VOP3P_Real.
- Look up an MFMA's co-execution info by its variant, as gfx1250 does
  for WMMA, instead of matching every opcode.
- Replace the is_dgemm and is_gfx940_xdl fields with the variant.
- Describe each MFMA row by the first stage at which SALU, memory, VALU
  and the next MFMA may issue, plus the window length.

Assisted-by: Claude Opus 5.5
DeltaFile
+62-308llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+76-33llvm/lib/Target/AMDGPU/VOP3PInstructions.td
+28-2llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+23-2llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+20-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+10-1llvm/lib/Target/AMDGPU/VOPInstructions.td
+219-3466 files

LLVM/project 35ff61c — llvm/lib/Target/AMDGPU AMDGPUCoExecSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir

[AMDGPU] Fix gfx950/gfx942 TRANS co-execute slot

On gfx950/gfx942, fix TRANS co-exec slot to be same as VALU.

Excluded from this commit:

  TRANS on gfx950 (in unit of hardware cycle):
    Reciprocal throughput (per SIMD):
      f32/f16: 8
      f64:     16
    Def-to-use latency:
      f32/f16: 12 to a non-TRANS reader, 8 to a TRANS reader
      f64:     20 to a non-TRANS reader, 16 to a TRANS reader
    Blocks this wave's issue for:
      f32/f16: 8
      f64:     16
  On gfx942, f32/f16 have the same numbers as f64 above.

Currently, GCNHazardRecognizer inserts the correct s_nop between a TRANS

    [4 lines not shown]
DeltaFile
+1-1llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+1-1llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+2-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+4-23 files

LLVM/project 2da96e1 — llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir

[AMDGPU] Precommit TRANS co-exec tests (NFC)

Add a gfx950 coexec scheduler case where a v_exp_f32 and a v_add_f32
compete for the window of an XDL2x (v_mfma_f32_16x16x32_bf16) MFMA.
No MFMA row allows TRANS so far, so the v_exp_f32 issues after the
MFMA window.

Assisted-by: Claude Opus 5.5
DeltaFile
+17-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+17-01 files

LLVM/project a563a05 — llvm/lib/Target/AMDGPU AMDGPUCoExecInfo.h AMDGPUCoExecSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir

[AMDGPU] Fix gfx950/gfx942 v_pk f32 instr co-exec slot

On gfx950/gfx942, v_pk f32 instrs can issue only after the MFMA's own
cycles (in hardware cycles):
  XDL/SMFMAC: 8 cycles
  XDL2x/SMFMAC2x: 12 cycles
  SGEMM/DGEMM: 8 cycles

Currently they are categorized as VALU. This is wrong for
XDL/SMFMAC/XDL2x/SMFMAC2x, since VALU can issue within the MFMA's own
cycles.

Fix this by adding a PK_F32 CoExecMask bit, a PK_F32 slot in each MFMA
row, and a PackedF32VALU InstructionFlavor. Classify the following
instrs as PackedF32VALU on gfx942/gfx950:

V_PK_{ADD,FMA,MUL}_F32, V_PK_MOV_B32.

NFC for gfx1250.

    [2 lines not shown]
DeltaFile
+35-21llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+23-21llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+16-8llvm/lib/Target/AMDGPU/AMDGPUCoExecInfo.h
+1-1llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+75-514 files

LLVM/project f6c95da — llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir, llvm/unittests/Target/AMDGPU MFMACoExecRules.cpp

[AMDGPU] Precommit packed F32 co-exec tests (NFC)

Add a gfx950 coexec scheduler case where a v_pk_add_f32 and a v_add_f32
compete for the window of an XDL2x (v_mfma_f32_16x16x32_bf16) MFMA, and
a unit test for the co-execution class of the packed F32 instructions
and v_pk_add_f16. Packed F32 VALU is treated as plain VALU so far.

Assisted-by: Claude Opus 5.5
DeltaFile
+35-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+17-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+52-02 files

LLVM/project 5a2d47c — llvm/lib/Target/AMDGPU AMDGPUCoExecInfo.h AMDGPUTargetMachine.cpp, llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir coexec-sched-warning.mir

[AMDGPU] Add MFMA co-exec rows for gfx942 MFMAs

Add MFMA co-exec rows for gfx942 MFMAs for both gfx942 and gfx950.
Gfx950 support gfx942 mfma opcodes as well as others.

Add rows for:

XDL_2Pass:
  v_mfma_f32_4x4x4_16b_{f16,bf16}
  v_mfma_i32_4x4x4_16b_i8

XDL_4Pass:
  v_mfma_f32_16x16x16_{f16,bf16}
  v_mfma_i32_16x16x32_i8
  v_mfma_f32_16x16x8_xf32 (gfx942 only)
  v_mfma_f32_16x16x32_{bf8,fp8}_{bf8,fp8}

XDL_8Pass:
  v_mfma_f32_16x16x4_4b_{f16,bf16}

    [43 lines not shown]
DeltaFile
+48-13llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+15-13llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+6-5llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+3-3llvm/lib/Target/AMDGPU/AMDGPUCoExecInfo.h
+2-2llvm/test/CodeGen/AMDGPU/coexec-sched-warning.mir
+1-1llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+75-372 files not shown
+77-398 files

LLVM/project e609ea9 — llvm/test/CodeGen/AMDGPU coexec-sched-warning.mir coexec-mfma-interleave-gfx942.mir, llvm/unittests/Target/AMDGPU MFMACoExecRules.cpp

[AMDGPU] Precommit legacy MFMA co-exec tests (NFC)

Add coexec scheduler cases for a gfx940 SMFMAC
(v_smfmac_f32_16x16x32_f16) on gfx950 and for a DGEMM
(v_mfma_f64_16x16x4_f64) on gfx942 and gfx950, a gfx942 RUN line in
coexec-sched-warning.mir, and unit test rows for one MFMA per legacy
variant on gfx950 plus v_mfma_f64_16x16x4_f64 on gfx942.

The legacy variants fall back to a permissive window that lets anything
co-execute. v_mfma_f64_16x16x4_f64 uses its gfx950 rule on gfx942 as
well, and gfx942 does not enable the co-exec model yet, so it warns and
its scheduler case runs without the model.

Assisted-by: Claude Opus 5.5
DeltaFile
+64-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+49-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx942.mir
+11-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+2-0llvm/test/CodeGen/AMDGPU/coexec-sched-warning.mir
+126-04 files

LLVM/project b543d8f — llvm/lib/Target/AMDGPU AMDGPUCoExecSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir

[AMDGPU] Fix gfx950 MFMA co-exec rows for XDL2x_8Pass, SMFMAC2x, DGEMM

Fix the co-exec rows for the following instructions:

XDL2x_8Pass:
  v_mfma_f32_32x32x16_f16
  v_mfma_f32_32x32x16_bf16
  v_mfma_i32_32x32x32_i8
  v_mfma_f32_32x32x64_f8f6f4 and v_mfma_scale_f32_32x32x64_f8f6f4
  with no fp8/bf8 operand

SMFMAC2x_4Pass:
  v_smfmac_f32_16x16x64_f16
  v_smfmac_f32_16x16x64_bf16
  v_smfmac_i32_16x16x128_i8
  v_smfmac_f32_16x16x128_{bf8,fp8}_{bf8,fp8}

SMFMAC2x_8Pass:
  v_smfmac_f32_32x32x32_f16

    [8 lines not shown]
DeltaFile
+11-5llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+4-4llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+1-1llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+16-103 files

LLVM/project 4766c8b — llvm/test/CodeGen/AMDGPU coexec-mfma-interleave-gfx950.mir, llvm/unittests/Target/AMDGPU MFMACoExecRules.cpp

[AMDGPU] Precommit gfx950 MFMA co-exec row tests (NFC)

Add a gfx950 coexec scheduler case for v_smfmac_f32_16x16x64_f16, and a
unit test that checks the first co-exec stage of SALU, DS and VMEM, VALU
and the next MFMA for one MFMA per gfx950 variant.

Assisted-by: Claude Opus 5.5
DeltaFile
+37-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+17-0llvm/test/CodeGen/AMDGPU/coexec-mfma-interleave-gfx950.mir
+54-02 files

LLVM/project bed4a8c — llvm/lib/Target/AMDGPU VOPInstructions.td VOP3PInstructions.td, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.h AMDGPUBaseInfo.cpp

[AMDGPU] Describe MFMAs with a variant in MAIInstInfoTable (NFC)

- Add an MFMAVariant enum. Each MFMA pseudo gets its variant from
  MAIInstInfoTable, a TableGen GenericTable. Each real MFMA opcode
  inherits the variant of its pseudo through VOP3P_Real.
- Look up an MFMA's co-execution info by its variant, as gfx1250 does
  for WMMA, instead of matching every opcode.
- Replace the is_dgemm and is_gfx940_xdl fields with the variant.
- Describe each MFMA row by the first stage at which SALU, memory, VALU
  and the next MFMA may issue, plus the window length.

Assisted-by: Claude Opus 5.5
DeltaFile
+62-308llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+76-33llvm/lib/Target/AMDGPU/VOP3PInstructions.td
+28-2llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+23-2llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+20-0llvm/unittests/Target/AMDGPU/MFMACoExecRules.cpp
+10-1llvm/lib/Target/AMDGPU/VOPInstructions.td
+219-3466 files