---
generated: true
model: claude-fable-5
generated_at: 2026-07-08T15:10:36+00:00
source_commit: f39188078fe010048714735213c24a7cb15532b9
watched_paths_digest: 694ede7ee9a0c71887ca7d26c855b3ecf4911eac160f884ac7385feae9061311
source_doc: docs/generated/design/ir-reference/decorations.md
source_doc_digest: 543ef07a018da0fce5b6b418df9248d11717d540b3c99c4ad14e5418822fe88a
warning: "Auto-generated. May drift from source. Do not edit by hand."
---

# Tests for ir-reference/decorations

## Intent

Tests verify the per-opcode catalog of the IR `Decoration` family
described in
[`docs/generated/design/ir-reference/decorations.md`](../../../design/ir-reference/decorations.md):
that each documented decoration opcode, in a representative sample
across the catalog's categories, appears in `-dump-ir` output with
the schema-described operand shape when its natural AST-side
surface is present.

The bundle does not enumerate all ~180 documented decoration
opcodes (per the prompt). It samples 2-4 decorations per
observable category: Naming and provenance, Layout and binding,
Loop and branch hints, Target-specific definition and intrinsics,
Interpolation and shader IO, Entry-point and stage, Linkage and
lifetime, Inlining and optimization, and Other. Synthesized
decorations (autodiff markers, specialization/dispatch decorations,
debug markers introduced by IR passes) are out-of-scope for this
representative bundle — they are not anchored at a stable
AST-side surface.

The primary observation mechanism is `-target spirv-asm -dump-ir
-o /dev/null -entry main -stage compute` followed by a FileCheck
against the LOWER-TO-IR section. The doc's notable-opcodes section
on the control-flow hints (`branch` / `flatten` / `loopControl`)
additionally claims the hints are consumed by the backend emit
step; those claims are observed with `pipeline_stage=emit` tests
that FileCheck the emitted HLSL attribute text and SPIR-V
selection-control masks. Anchors are decoration spellings
(`[nameHint("...")]`, `[entryPoint(...)]`, `[loopControl(N : Int)]`,
`[targetIntrinsic(...)]`) and, where ordering matters, the
immediately-following user-named anchor (`func %name`, `let %name`,
`struct %name`).

The angle distinguishing this bundle from
`cross-cutting/ir-instructions` (one-shot per IR family) and
`ir-reference/structure` (which observes a couple of decorations
attached to structural parents — `nameHint` on a `func`, `export`
on a struct-field key) is: **the decoration family in its own
right**, sampling its breadth across categories.

## Functional coverage

| Claim                                                                                                                                                                                                                              | Intent     | Anchor                                                                                                                                | Tests                                                                                                |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| The [branch] hint is consumed by the backend emit step: HLSL re-emits the [branch] attribute on the conditional and SPIR-V encodes the DontFlatten selection control on the conditional's merge.                                   | functional | [#branch-flatten-loopcontrol](../../../design/ir-reference/decorations.md#branch-flatten-loopcontrol)                                 | [`branch-hint-consumed-at-emit.slang`](branch-hint-consumed-at-emit.slang)                           |
| The [flatten] hint is consumed by the backend emit step: HLSL re-emits the [flatten] attribute on the conditional and SPIR-V encodes the Flatten selection control on the conditional's merge.                                     | functional | [#branch-flatten-loopcontrol](../../../design/ir-reference/decorations.md#branch-flatten-loopcontrol)                                 | [`flatten-hint-consumed-at-emit.slang`](flatten-hint-consumed-at-emit.slang)                         |
| The loopControl loop mode recorded from [loop] flows through the IR unchanged and is re-emitted by the HLSL backend as the [loop] attribute on the loop.                                                                           | functional | [#branch-flatten-loopcontrol](../../../design/ir-reference/decorations.md#branch-flatten-loopcontrol)                                 | [`loop-control-loop-consumed-at-emit.slang`](loop-control-loop-consumed-at-emit.slang)               |
| The loopControl unroll mode recorded from [unroll] flows through the IR unchanged and is re-emitted by the HLSL backend as the [unroll] attribute on the loop.                                                                     | functional | [#branch-flatten-loopcontrol](../../../design/ir-reference/decorations.md#branch-flatten-loopcontrol)                                 | [`loop-control-unroll-consumed-at-emit.slang`](loop-control-unroll-consumed-at-emit.slang)           |
| A WaveSize attribute on a compute entry point lowers to a waveSize decoration carrying the requested lane count.                                                                                                                   | functional | [#entry-point-and-stage](../../../design/ir-reference/decorations.md#entry-point-and-stage)                                           | [`wave-size-decoration.slang`](wave-size-decoration.slang)                                           |
| A numthreads(x,y,z) attribute lowers to a numThreads decoration with three IRIntLit operands carrying the workgroup dimensions in source order.                                                                                    | functional | [#entry-point-and-stage](../../../design/ir-reference/decorations.md#entry-point-and-stage)                                           | [`num-threads-decoration.slang`](num-threads-decoration.slang)                                       |
| Boundary - WaveSize(128) at the documented large-lane edge produces waveSize(128:Int) unchanged.                                                                                                                                   | boundary   | [#entry-point-and-stage](../../../design/ir-reference/decorations.md#entry-point-and-stage)                                           | [`wave-size-max.slang`](wave-size-max.slang)                                                         |
| Boundary - WaveSize(4) at the documented small-lane edge produces waveSize(4:Int) in the dump.                                                                                                                                     | boundary   | [#entry-point-and-stage](../../../design/ir-reference/decorations.md#entry-point-and-stage)                                           | [`wave-size-min.slang`](wave-size-min.slang)                                                         |
| Boundary - a large workgroup dimension (1024) on numthreads flows through unchanged into the numThreads decoration's first integer operand.                                                                                        | boundary   | [#entry-point-and-stage](../../../design/ir-reference/decorations.md#entry-point-and-stage)                                           | [`num-threads-large-x.slang`](num-threads-large-x.slang)                                             |
| Boundary - numthreads with a single x argument defaults missing y and z dimensions to 1, surfacing as numThreads(x:Int, 1:Int, 1:Int).                                                                                             | boundary   | [#entry-point-and-stage](../../../design/ir-reference/decorations.md#entry-point-and-stage)                                           | [`num-threads-x-only.slang`](num-threads-x-only.slang)                                               |
| Boundary - the smallest legal numthreads(1,1,1) lowers to numThreads(1:Int, 1:Int, 1:Int) with all three operands at 1.                                                                                                            | boundary   | [#entry-point-and-stage](../../../design/ir-reference/decorations.md#entry-point-and-stage)                                           | [`num-threads-min.slang`](num-threads-min.slang)                                                     |
| Negative - [numthreads()] with zero arguments fires E31001 wrong-argument-count, confirming the attribute arity validator runs before lowering.                                                                                    | negative   | [#entry-point-and-stage](../../../design/ir-reference/decorations.md#entry-point-and-stage)                                           | [`numthreads-arg-count-error.slang`](numthreads-arg-count-error.slang)                               |
| Negative - [numthreads(-1,1,1)] is rejected with E31102, confirming that the positive-integer validator also catches signed underflow.                                                                                             | negative   | [#entry-point-and-stage](../../../design/ir-reference/decorations.md#entry-point-and-stage)                                           | [`numthreads-negative-error.slang`](numthreads-negative-error.slang)                                 |
| Negative - [numthreads(0,1,1)] is rejected with E31102 "expected a positive integer", confirming the value validator catches the lower-edge invalid input before any numThreads decoration is created.                             | negative   | [#entry-point-and-stage](../../../design/ir-reference/decorations.md#entry-point-and-stage)                                           | [`numthreads-zero-error.slang`](numthreads-zero-error.slang)                                         |
| Stress - a compute entry point stacked with numthreads, WaveSize, and earlydepthstencil simultaneously surfaces all four entry-point/stage decorations (entryPoint, numThreads, waveSize, earlyDepthStencil) on the same function. | stress     | [#entry-point-and-stage](../../../design/ir-reference/decorations.md#entry-point-and-stage)                                           | [`entry-point-with-many-attributes.slang`](entry-point-with-many-attributes.slang)                   |
| A function marked with shader/numthreads attributes lowers to a func with an entryPoint decoration carrying profile-int, entry-name, and module-name operands.                                                                     | functional | [#entrypoint-entrypointdecoration](../../../design/ir-reference/decorations.md#entrypoint-entrypointdecoration)                       | [`entry-point-decoration.slang`](entry-point-decoration.slang)                                       |
| A second user-named helper called from main coexists with the entry-point: both functions surface their own decorations independently in the dump.                                                                                 | functional | [#entrypoint-entrypointdecoration](../../../design/ir-reference/decorations.md#entrypoint-entrypointdecoration)                       | [`two-entry-points-coexist.slang`](two-entry-points-coexist.slang)                                   |
| Boundary - a [shader("vertex")] entry point lowers to an entryPoint decoration whose profile integer (1) differs from the compute encoding (6), confirming the per-stage tag enum.                                                 | boundary   | [#entrypoint-entrypointdecoration](../../../design/ir-reference/decorations.md#entrypoint-entrypointdecoration)                       | [`entry-point-vertex-profile.slang`](entry-point-vertex-profile.slang)                               |
| The entryPoint decoration's three operands are profile-tag, user-visible name, and module-name; a vertex stage uses a different profile-tag integer than compute.                                                                  | functional | [#entrypoint-entrypointdecoration](../../../design/ir-reference/decorations.md#entrypoint-entrypointdecoration)                       | [`entry-point-profile-and-module.slang`](entry-point-profile-and-module.slang)                       |
| A function decorated with [ForceInline] carries a ForceInline decoration with no operands.                                                                                                                                         | functional | [#inlining-and-optimization](../../../design/ir-reference/decorations.md#inlining-and-optimization)                                   | [`force-inline-decoration.slang`](force-inline-decoration.slang)                                     |
| A function decorated with [__NoSideEffect] carries a noSideEffect decoration with no operands.                                                                                                                                     | functional | [#inlining-and-optimization](../../../design/ir-reference/decorations.md#inlining-and-optimization)                                   | [`no-side-effect-decoration.slang`](no-side-effect-decoration.slang)                                 |
| A function decorated with [noinline] carries a noInline decoration with no operands.                                                                                                                                               | functional | [#inlining-and-optimization](../../../design/ir-reference/decorations.md#inlining-and-optimization)                                   | [`no-inline-decoration.slang`](no-inline-decoration.slang)                                           |
| A function decorated with \_\_unsafe_force_inline_early carries an unsafeForceInlineEarly decoration with no operands.                                                                                                             | functional | [#inlining-and-optimization](../../../design/ir-reference/decorations.md#inlining-and-optimization)                                   | [`unsafe-force-inline-early-decoration.slang`](unsafe-force-inline-early-decoration.slang)           |
| Boundary - a function carrying [__readNone] surfaces a bare readNone decoration distinct from noSideEffect, ForceInline, and the other inlining-and-optimization opcodes.                                                          | boundary   | [#inlining-and-optimization](../../../design/ir-reference/decorations.md#inlining-and-optimization)                                   | [`read-none-decoration.slang`](read-none-decoration.slang)                                           |
| Stress - a single function carrying many compatible inlining-and-optimization decorations stacked together produces every corresponding decoration in the dump, with no interference between them.                                 | stress     | [#inlining-and-optimization](../../../design/ir-reference/decorations.md#inlining-and-optimization)                                   | [`function-with-many-decorations.slang`](function-with-many-decorations.slang)                       |
| Two helper functions with opposing inlining hints ([ForceInline] vs [noinline]) each surface their own decoration, independent of the other.                                                                                       | functional | [#inlining-and-optimization](../../../design/ir-reference/decorations.md#inlining-and-optimization)                                   | [`two-inlining-hints-coexist.slang`](two-inlining-hints-coexist.slang)                               |
| A field declared with a nointerpolation modifier produces an interpolationMode decoration with the mode operand recording the chosen mode.                                                                                         | functional | [#interpolation-and-shader-io](../../../design/ir-reference/decorations.md#interpolation-and-shader-io)                               | [`interpolation-mode-decoration.slang`](interpolation-mode-decoration.slang)                         |
| A field declared with an HLSL semantic produces a semantic decoration with (name, index) operands; default index is -1.                                                                                                            | functional | [#interpolation-and-shader-io](../../../design/ir-reference/decorations.md#interpolation-and-shader-io)                               | [`semantic-decoration.slang`](semantic-decoration.slang)                                             |
| A function parameter declared with the precise modifier carries a precise decoration with no operands.                                                                                                                             | functional | [#interpolation-and-shader-io](../../../design/ir-reference/decorations.md#interpolation-and-shader-io)                               | [`precise-decoration.slang`](precise-decoration.slang)                                               |
| A struct field declared with a TEXCOORD semantic emits a semantic decoration on the field's key with the semantic name and default -1 index.                                                                                       | functional | [#interpolation-and-shader-io](../../../design/ir-reference/decorations.md#interpolation-and-shader-io)                               | [`semantic-on-struct-field.slang`](semantic-on-struct-field.slang)                                   |
| A vertex-shader parameter declared with a non-SV semantic (POSITION) carries the same semantic decoration shape as SV-prefixed semantics with index -1 when no index is given.                                                     | functional | [#interpolation-and-shader-io](../../../design/ir-reference/decorations.md#interpolation-and-shader-io)                               | [`system-value-semantic-on-param.slang`](system-value-semantic-on-param.slang)                       |
| An [earlydepthstencil] attribute lowers to a bare earlyDepthStencil decoration with no operands.                                                                                                                                   | functional | [#interpolation-and-shader-io](../../../design/ir-reference/decorations.md#interpolation-and-shader-io)                               | [`early-depth-stencil-decoration.slang`](early-depth-stencil-decoration.slang)                       |
| Boundary - a TEXCOORDn with the index baked into the semantic name (TEXCOORD3) lowers to semantic("TEXCOORD3", -1:Int); the index is fused with the name rather than carried in the second operand.                                | boundary   | [#interpolation-and-shader-io](../../../design/ir-reference/decorations.md#interpolation-and-shader-io)                               | [`semantic-explicit-index.slang`](semantic-explicit-index.slang)                                     |
| Boundary - a `linear` modifier produces interpolationMode with mode operand 0, the lowest documented interpolation-mode enum value.                                                                                                | boundary   | [#interpolation-and-shader-io](../../../design/ir-reference/decorations.md#interpolation-and-shader-io)                               | [`interpolation-mode-linear.slang`](interpolation-mode-linear.slang)                                 |
| Boundary - a `nointerpolation` modifier produces interpolationMode with mode operand 2, the documented value distinct from `linear` (0), `noperspective` (1), `centroid` (3), and `sample` (4).                                    | boundary   | [#interpolation-and-shader-io](../../../design/ir-reference/decorations.md#interpolation-and-shader-io)                               | [`interpolation-mode-nointerpolation.slang`](interpolation-mode-nointerpolation.slang)               |
| Boundary - a `sample` modifier produces interpolationMode with mode operand 4, the upper edge of the documented mode-enum range observed in the IR dump.                                                                           | boundary   | [#interpolation-and-shader-io](../../../design/ir-reference/decorations.md#interpolation-and-shader-io)                               | [`interpolation-mode-sample.slang`](interpolation-mode-sample.slang)                                 |
| Stress - a struct with many fields, each carrying interpolationMode + glslLocation + semantic decorations, produces all per-field decorations in the dump without merging or collisions across fields.                             | stress     | [#interpolation-and-shader-io](../../../design/ir-reference/decorations.md#interpolation-and-shader-io)                               | [`struct-with-many-field-decorations.slang`](struct-with-many-field-decorations.slang)               |
| The compute entry-point function receives a keepAlive decoration so the DCE pass does not strip it before emit.                                                                                                                    | functional | [#keepalivedecoration](../../../design/ir-reference/decorations.md#keepalivedecoration)                                               | [`keep-alive-on-entry-point.slang`](keep-alive-on-entry-point.slang)                                 |
| The front-end attaches a keepAlive decoration to a global_param so it survives DCE even with no in-IR use chain reaching it.                                                                                                       | functional | [#keepalivedecoration](../../../design/ir-reference/decorations.md#keepalivedecoration)                                               | [`keep-alive-on-global-param.slang`](keep-alive-on-global-param.slang)                               |
| A [vk::location(N)] modifier lowers to a glslLocation decoration carrying the integer location operand.                                                                                                                            | functional | [#layout-and-binding](../../../design/ir-reference/decorations.md#layout-and-binding)                                                 | [`glsl-location-decoration.slang`](glsl-location-decoration.slang)                                   |
| A global parameter declared with a register(uN) binding lowers to a HasExplicitHLSLBinding decoration on the parameter.                                                                                                            | functional | [#layout-and-binding](../../../design/ir-reference/decorations.md#layout-and-binding)                                                 | [`hlsl-binding-decoration.slang`](hlsl-binding-decoration.slang)                                     |
| Boundary - a `: packoffset(c2.y)` modifier lowers to a packoffset decoration with (registerOffset, componentOffset) = (2, 1).                                                                                                      | boundary   | [#layout-and-binding](../../../design/ir-reference/decorations.md#layout-and-binding)                                                 | [`packoffset-decoration.slang`](packoffset-decoration.slang)                                         |
| Boundary - a large vk::location index (63) flows through into glslLocation(63:Int) unchanged.                                                                                                                                      | boundary   | [#layout-and-binding](../../../design/ir-reference/decorations.md#layout-and-binding)                                                 | [`glsl-location-large.slang`](glsl-location-large.slang)                                             |
| Boundary - vk::location(0) at the lower edge produces glslLocation(0:Int).                                                                                                                                                         | boundary   | [#layout-and-binding](../../../design/ir-reference/decorations.md#layout-and-binding)                                                 | [`glsl-location-zero.slang`](glsl-location-zero.slang)                                               |
| The layout decoration attaches a Layout opcode reference to a global parameter; the operand is an inst-reference to a Layout instruction.                                                                                          | functional | [#layout-layoutdecoration](../../../design/ir-reference/decorations.md#layout-layoutdecoration)                                       | [`layout-decoration.slang`](layout-decoration.slang)                                                 |
| A top-level struct declaration carries an export decoration recording its mangled type-linkage name (prefix \_ST).                                                                                                                 | functional | [#linkage-and-lifetime](../../../design/ir-reference/decorations.md#linkage-and-lifetime)                                             | [`export-on-struct.slang`](export-on-struct.slang)                                                   |
| A user-declared uniform global parameter carries an export decoration with the variable-linkage mangled name (prefix \_SV).                                                                                                        | functional | [#linkage-and-lifetime](../../../design/ir-reference/decorations.md#linkage-and-lifetime)                                             | [`export-on-global-param.slang`](export-on-global-param.slang)                                       |
| Boundary - a witness-table for an interface-conforming struct carries an export decoration whose mangled name uses the witness-table prefix \_SW, distinct from the function (\_SR), type (\_ST), and variable (\_SV) prefixes.    | boundary   | [#linkage-and-lifetime](../../../design/ir-reference/decorations.md#linkage-and-lifetime)                                             | [`export-witness-table-prefix.slang`](export-witness-table-prefix.slang)                             |
| Every user-declared top-level function carries an export decoration whose operand is its mangled linkage name.                                                                                                                     | functional | [#linkage-and-lifetime](../../../design/ir-reference/decorations.md#linkage-and-lifetime)                                             | [`export-linkage-decoration.slang`](export-linkage-decoration.slang)                                 |
| A [branch] attribute on a conditional lowers to a branch decoration with no operands.                                                                                                                                              | functional | [#loop-and-branch-hints](../../../design/ir-reference/decorations.md#loop-and-branch-hints)                                           | [`branch-decoration.slang`](branch-decoration.slang)                                                 |
| A [flatten] attribute on a conditional lowers to a flatten decoration with no operands attached to the conditional inst.                                                                                                           | functional | [#loop-and-branch-hints](../../../design/ir-reference/decorations.md#loop-and-branch-hints)                                           | [`flatten-decoration.slang`](flatten-decoration.slang)                                               |
| An [unroll] attribute on a for-loop emits a loopControl decoration on the loop with mode operand 1.                                                                                                                                | functional | [#loop-and-branch-hints](../../../design/ir-reference/decorations.md#loop-and-branch-hints)                                           | [`loop-control-unroll.slang`](loop-control-unroll.slang)                                             |
| Boundary - a [loop] attribute on a for-loop produces loopControl with mode operand 1, the documented "loop" encoding distinct from [unroll]'s mode 0.                                                                              | boundary   | [#loop-and-branch-hints](../../../design/ir-reference/decorations.md#loop-and-branch-hints)                                           | [`loop-control-loop-mode.slang`](loop-control-loop-mode.slang)                                       |
| Boundary - the [ForceUnroll] attribute is loop-statement-only and produces a ForceUnroll decoration on the loop with an integer operand recording the requested unroll count (0 when omitted).                                     | boundary   | [#loop-and-branch-hints](../../../design/ir-reference/decorations.md#loop-and-branch-hints)                                           | [`force-unroll-on-loop.slang`](force-unroll-on-loop.slang)                                           |
| Boundary - the [MaxIters(N)] attribute produces a loopMaxIters decoration carrying the upper-bound integer N on the loop.                                                                                                          | boundary   | [#loop-and-branch-hints](../../../design/ir-reference/decorations.md#loop-and-branch-hints)                                           | [`loop-max-iters.slang`](loop-max-iters.slang)                                                       |
| Negative - [ForceUnroll] on a function declaration is rejected with E31002 "invalid attribute placement"; the attribute is loop-statement-only despite the doc listing its AST origin generically as "[ForceUnroll] attribute".    | negative   | [#loop-and-branch-hints](../../../design/ir-reference/decorations.md#loop-and-branch-hints)                                           | [`force-unroll-on-function-error.slang`](force-unroll-on-function-error.slang)                       |
| Stress - a cascade of conditionals with mixed [branch] and [flatten] hints produces multiple independent branch and flatten decorations on distinct ifElse instructions in the same function.                                      | stress     | [#loop-and-branch-hints](../../../design/ir-reference/decorations.md#loop-and-branch-hints)                                           | [`branch-and-flatten-cascade.slang`](branch-and-flatten-cascade.slang)                               |
| Two for-loops decorated with different loop-control attributes ([unroll] vs [loop]) each get their own loopControl decoration, demonstrating that two such decorations coexist in the same function.                               | functional | [#loop-and-branch-hints](../../../design/ir-reference/decorations.md#loop-and-branch-hints)                                           | [`two-loop-controls-coexist.slang`](two-loop-controls-coexist.slang)                                 |
| A geometry-shader entry point declaring a `triangle` input parameter lowers to a trianglePrimitiveType decoration on that parameter, with no operands.                                                                             | expansion  | [#mesh-shader-geometry-shader-and-per-vertex](../../../design/ir-reference/decorations.md#mesh-shader-geometry-shader-and-per-vertex) | [`triangle-primitive-type-on-geometry-input.slang`](triangle-primitive-type-on-geometry-input.slang) |
| A geometry-shader output declaration using TriangleStream lowers to a streamOutputTypeDecoration recording the HLSL stream-output type.                                                                                            | expansion  | [#mesh-shader-geometry-shader-and-per-vertex](../../../design/ir-reference/decorations.md#mesh-shader-geometry-shader-and-per-vertex) | [`stream-output-type-decoration.slang`](stream-output-type-decoration.slang)                         |
| A user-named function carries a nameHint decoration with the source identifier as a string literal operand.                                                                                                                        | functional | [#namehint-namehintdecoration](../../../design/ir-reference/decorations.md#namehint-namehintdecoration)                               | [`name-hint-on-function.slang`](name-hint-on-function.slang)                                         |
| Two distinct user-named functions each carry their own nameHint decoration with the matching source identifier as the string operand.                                                                                              | functional | [#namehint-namehintdecoration](../../../design/ir-reference/decorations.md#namehint-namehintdecoration)                               | [`name-hint-survives-on-call-result.slang`](name-hint-survives-on-call-result.slang)                 |
| A nameHint decoration also attaches to function parameters carrying the declared parameter name.                                                                                                                                   | functional | [#naming-and-provenance](../../../design/ir-reference/decorations.md#naming-and-provenance)                                           | [`name-hint-on-param.slang`](name-hint-on-param.slang)                                               |
| A user-declared struct carries a nameHint decoration whose string operand is the source identifier of the struct.                                                                                                                  | functional | [#naming-and-provenance](../../../design/ir-reference/decorations.md#naming-and-provenance)                                           | [`name-hint-on-struct.slang`](name-hint-on-struct.slang)                                             |
| Core-module-builtin interfaces such as IBufferDataLayout carry a BuiltinDecoration in the IR dump.                                                                                                                                 | functional | [#naming-and-provenance](../../../design/ir-reference/decorations.md#naming-and-provenance)                                           | [`builtin-decoration.slang`](builtin-decoration.slang)                                               |
| A member function declared on a struct lowers to a func with a method decoration attached.                                                                                                                                         | functional | [#other](../../../design/ir-reference/decorations.md#other)                                                                           | [`method-decoration.slang`](method-decoration.slang)                                                 |
| The synthesized struct initializer carries a constructor decoration; the dump prints constructor(true) with a Bool literal operand.                                                                                                | functional | [#other](../../../design/ir-reference/decorations.md#other)                                                                           | [`constructor-decoration.slang`](constructor-decoration.slang)                                       |
| Calling a core-module built-in pulls in its [targetIntrinsic(capSet, "spelling")] decoration in the IR dump's core-module section.                                                                                                 | functional | [#targetintrinsic-targetintrinsicdecoration](../../../design/ir-reference/decorations.md#targetintrinsic-targetintrinsicdecoration)   | [`target-intrinsic-decoration.slang`](target-intrinsic-decoration.slang)                             |

## Untested claims

| Claim                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Reason          | Anchor                                                                                                          | Why untested                                                                                                                              |
|   | --------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **Debug / reflection decorations** — `DebugLocation`, `DebugFunction`, `CounterBuffer`. Require `-g` or `[counter]` plumbing distinct from a per-opcode reference angle.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | (unclassified)  | [#debuglocation](../../../design/ir-reference/decorations.md#debuglocation)                                     | Reason and explanation to be refined by the next regeneration.                                                                            |
| **`format`, `output`, `input`, `glslOuterArray`, `vkStructOffset`, `packoffset`, `glslOffset`** — observable in principle but require specialized binding/format surface out of scope for the representative sample.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | (unclassified)  | [#format](../../../design/ir-reference/decorations.md#format)                                                   | Reason and explanation to be refined by the next regeneration.                                                                            |
| **`fpDenormalPreserve`, `fpDenormalFlushToZero`, `DerivativeGroupQuad`, `DerivativeGroupLinear`, `MaximallyReconverges`, `QuadDerivatives`, `RequireFullQuads`, `FloatingPointModeOverride`, `experimentalModule`, `DisallowSpecializationWithExistentialsDecoration`, `BitFieldAccessorDecoration`** — niche surfaces out of scope for the representative bundle. Each is single-decoration observable in principle; future bundle expansion can add one test per such decoration if its AST surface stabilises.                                                                                                                                                                                                                                                                                                                                                                                          | (unclassified)  | [#fpdenormalpreserve](../../../design/ir-reference/decorations.md#fpdenormalpreserve)                           | Reason and explanation to be refined by the next regeneration.                                                                            |
| **`public`, `hlslExport`, `dependsOn`, `noRefInline`, `nonCopyable`, `alwaysFold`, `readNone`, `AllowPreTranslationInlining`, `DefaultValue`, `perprimitive`, `TargetSystemValue`, `intrinsicOp`, `requirePrelude`, `spirvOpDecoration`** — observable on natural surface but the bundle samples a representative subset of the inlining/optimization and target-intrinsic categories rather than every per-opcode row.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | (unclassified)  | [#public](../../../design/ir-reference/decorations.md#public)                                                   | Reason and explanation to be refined by the next regeneration.                                                                            |
| **`raypayload`, `vulkanRayPayload`, `vulkanRayPayloadIn`, `vulkanHitAttributes`, `vulkanHitObjectAttributes`, `vulkanCallablePayload`, `vulkanCallablePayloadIn`** — raytracing-pipeline-specific markers requiring raytracing entry-point scaffolding.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | (unclassified)  | [#raypayload](../../../design/ir-reference/decorations.md#raypayload)                                           | Reason and explanation to be refined by the next regeneration.                                                                            |
| **Capability / availability decorations except spot samples** — `requireCapabilityAtom`, `requireSPIRVVersion`, `requireGLSLVersion`, `requireGLSLExtension`, `requireWGSLExtension`, `requireCUDASMVersion`. These attach to core-module functions during lowering but do not have stable user-side anchors without target-specific surface.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | (unclassified)  | [#requirecapabilityatom](../../../design/ir-reference/decorations.md#requirecapabilityatom)                     | Reason and explanation to be refined by the next regeneration.                                                                            |
| **NVAPI / CUDA / DLL / Python interop decorations** — `requiresNVAPI`, `nvapiMagic`, `nvapiSlot`, `RequireSPIRVDescriptorIndexingExtensionDecoration`, `dllImport`, `dllExport`, `cudaDeviceExport`, `CudaKernel`, `CudaHost`, `TorchEntryPoint`, `AutoPyBindCUDA`, `PyExportDecoration`, `externCpp`, `externC`, `TargetBuiltinVar`. These require non-default `-target` settings or specialized markers.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | (unclassified)  | [#requiresnvapi](../../../design/ir-reference/decorations.md#requiresnvapi)                                     | Reason and explanation to be refined by the next regeneration.                                                                            |
| **SPIR-V backend hint decorations** — `spvBufferBlock`, `spvBlock`, `NonUniformResource`, `MemoryQualifierSetDecoration`. These are introduced by the SPIR-V backend after LOWER-TO-IR; observing them requires a later dump stage that is out of scope for the per-opcode reference angle of this bundle.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | (unclassified)  | [#spvbufferblock](../../../design/ir-reference/decorations.md#spvbufferblock)                                   | Reason and explanation to be refined by the next regeneration.                                                                            |
| **`UserTypeName`, `COMInterface`, `COMWitnessDecoration`, `UserExtern`, `highLevelDecl`** — observable but require COM / reflection / extern scaffolding that distracts from the representative sample goal.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | (unclassified)  | [#usertypename](../../../design/ir-reference/decorations.md#usertypename)                                       | Reason and explanation to be refined by the next regeneration.                                                                            |
| **All Differentiation marker decorations** — `AutoDiffOriginalValueDecoration`, `AutoDiffBuiltinDecoration`, `BackwardDerivativePrimalContextDecoration`, `BackwardDerivativePrimalReturnDecoration`, `PrimalContextDecoration`, `ParamsContextDecoration`, `primalInstDecoration`, `diffInstDecoration`, `mixedDiffInstDecoration`, `RecomputeBlockDecoration`, `primalValueKey`, `primalElementType`, `IntermediateContextFieldDifferentialTypeDecoration`, `ReturnValueContextFieldDecoration`, `derivativeMemberDecoration`, `treatCallAsDifferentiableDecoration`, `differentiableCallDecoration`, `PreferCheckpointDecoration`, `PreferRecomputeDecoration`, `DifferentiableTypeDictionaryDecoration`, `CudaKernelFwdDiffRef`, `CudaKernelBwdDiffRef`. These are introduced by the autodiff pass on transcribed instructions and do not have a stable per-decoration AST-side anchor at LOWER-TO-IR. | link-stage-only | [#autodifforiginalvaluedecoration](../../../design/ir-reference/decorations.md#autodifforiginalvaluedecoration) | Synthesized at a later IR pass than this bundle's `pipeline_stage` observes; the test belongs in the bundle whose pipeline stage matches. |
| **All `(synthesized)` decorations** — every row whose `AST origin` column reads `(synthesized)` lacks a stable AST-side anchor and is out of scope for this representative bundle. This includes `BinaryInterfaceType`, `PhysicalType`, `AlignedAddressDecoration`, `SizeAndAlignment`, `Offset`, `optimizableTypeDecoration`, `NonDynamicUniformReturnDecoration`, `bindExistentialSlots`, `DispatchFuncDecoration`, `SpecializationDepthDecoration`, `SequentialIDDecoration`, `RTTI_typeSize`, `AnyValueSize`, `transitory`, `InParamProxyVar`, `TempCallArgImmutableVar`, `TempCallArgVar`, `GlobalVariableShadowingGlobalParameterDecoration`, `DisableCopyEliminationDecoration`, `DynamicUniform`, `availableInDownstreamIR`, `downstreamModuleExport`, `downstreamModuleImport`, `PyBindExportFuncInfo`, `ignoreSideEffectsDecoration`, `loopCounterDecoration`, `loopCounterUpdateDecoration`.    | link-stage-only | [#binaryinterfacetype](../../../design/ir-reference/decorations.md#binaryinterfacetype)                         | Synthesized at a later IR pass than this bundle's `pipeline_stage` observes; the test belongs in the bundle whose pipeline stage matches. |
| **Specialization / conformance / existentials decorations** — `SpecializeDecoration`, `DynamicDispatchWitnessDecoration`, `StaticRequirementDecoration`, `TypeConstraintDecoration`, `ResultWitness`, `SpecializationConstantDecoration`. These are largely synthesized by the specialization pass.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | link-stage-only | [#specializedecoration](../../../design/ir-reference/decorations.md#specializedecoration)                       | Synthesized at a later IR pass than this bundle's `pipeline_stage` observes; the test belongs in the bundle whose pipeline stage matches. |
| **Mesh / geometry / hull / domain shader decorations not yet sampled** — `pointPrimitiveType`, `linePrimitiveType`, `lineAdjPrimitiveType`, `triangleAdjPrimitiveType`, `vertices`, `indices`, `primitives`, `HLSLMeshPayloadDecoration`, `PositionOutput`, `PositionInput`, `PerVertex`, `stageReadAccess`, `stageWriteAccess`, `patchConstantFunc`, `maxTessFactor`, `outputControlPoints`, `outputTopology`, `partitioning`, `domain`, `maxVertexCount`, `instance`, `GeometryInputPrimitiveTypeDecoration`, `MeshOutputDecoration`, `StageAccessDecoration`. `trianglePrimitiveType` and `streamOutputTypeDecoration` are now sampled via a geometry-shader test pair. The remaining decorations each require their own pipeline-specific entry-point scaffolding (mesh / hull / domain). | gpu-non-compute | [#mesh-shader-geometry-shader-and-per-vertex](../../../design/ir-reference/decorations.md#mesh-shader-geometry-shader-and-per-vertex) | Agent runtime has no GPU; CI / local machine does. |
| **`glslFragDepthGreater` / `glslFragDepthLess`** — synthesized by the GLSL legalization pass when a fragment output carries the `SV_DepthGreaterEqual` / `SV_DepthLessEqual` system-value semantic, and attached to the entry-point function rather than the parameter.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | link-stage-only | [#glslfragdepthgreater-glslfragdepthless](../../../design/ir-reference/decorations.md#glslfragdepthgreater-glslfragdepthless)         | Synthesized during GLSL target legalization, after the LOWER-TO-IR snapshot this bundle's `-dump-ir` observes; the doc delegates the emitted constrained-depth form to `pipeline/06-emit.md`, which is outside this bundle's allowed anchors. |
| **`BuiltinRequirementDecoration`** — tags an interface requirement key with the `BuiltinRequirementKind` role of the built-in requirement it stands for (e.g. `IDifferentiable.Differential`), attached to a hoistable `IRBuiltinRequirementKey` deduplicated by its kind operand.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | internal-source-fact | [#builtinrequirementdecoration](../../../design/ir-reference/decorations.md#builtinrequirementdecoration)       | Produced only for requirement decls carrying the internal AST `BuiltinRequirementModifier` (core-module built-in interfaces); the doc names no user-level syntax that creates one, and the only instances appear in the IR-dump core-module preamble, which this bundle's anchoring rules exclude. |

## Doc gaps observed

| Anchor                                                                                                                          | Kind                  | Gap                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Suggested addition                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------- | --------------------- |   | ---------------------------------------------------------------------------------------------------------------------------------- |
| [#entrypoint-entrypointdecoration](../../../design/ir-reference/decorations.md#entrypoint-entrypointdecoration)                 | undocumented-behavior | The doc's `### entryPoint / EntryPointDecoration` notable-opcodes section states "Its three operands are the profile (an IRIntLit tag), the user-visible name, and an optional module name", but does not specify the source of the module-name operand. In the observed dump it is the source-file stem (e.g. `"two-entry- points-coexist"` for `two-entry-points-coexist.slang`), which means a test that pins the literal module-name string is filename-fragile. A clarifying note that the module-name operand is derived from the file name (or compilation-unit name) would help test authors avoid this pitfall. |                                                                                                                                    |
| (unspecified)                                                                                                                   | undocumented-behavior | The `Loop and branch hints` table row for `loopControl` lists the operand as `modeOperand: IRConstant` but does not document the integer encoding — observed values are `0` for `[unroll]` and `1` for `[loop]`. Documenting the enum would make the test claim concrete instead of wildcarded.                                                                                                                                                                                                                                                                                                                          |                                                                                                                                    |
| (unspecified)                                                                                                                   | undocumented-behavior | The `Interpolation and shader IO` row for `interpolationMode` lists `modeOperand: IRConstant` but does not document the encoding. Observed values include `0` (for `linear`) and `2` (for `nointerpolation`); pinning these would let tests assert the exact mode rather than wildcarding.                                                                                                                                                                                                                                                                                                                               |                                                                                                                                    |
| [#inlines-calls-immediately-after-codegen](../../../design/ir-reference/decorations.md#inlines-calls-immediately-after-codegen) | undocumented-behavior | The `Inlining and optimization` row for `unsafeForceInlineEarly` says "Inlines calls immediately after codegen" but does not warn that the decoration's lifetime may be shorter than the LOWER-TO-IR dump can capture in adversarial pass-ordering scenarios. The current dump still includes it, but a note that the decoration may be consumed earlier than other inline hints would prevent surprise if pass ordering changes.                                                                                                                                                                                        |                                                                                                                                    |
| (unspecified)                                                                                                                   | missing-example       | The `Linkage and lifetime` row for `export` lists the operand as `(variadic, min=1)` but does not show the mangled-name encoding (function `_SR...`, type `_ST...`, variable `_SV...`, witness `_SW...`).                                                                                                                                                                                                                                                                                                                                                                                                                | A worked example showing the prefix-per- symbol-kind would help authors of cross-cutting tooling that consumes the export linkage. |
| [#marks-an-inst-as-a-compiler-builtin](../../../design/ir-reference/decorations.md#marks-an-inst-as-a-compiler-builtin)         | undocumented-behavior | The `Naming and provenance` row for `BuiltinDecoration` lists no operands and notes "Marks an inst as a compiler-builtin", but does not specify which built-in core-module declarations carry it. Observed in the dump: `IBufferDataLayout` and other `RWStructuredBuffer`-related core types. Documenting the invariant that "every core-module-declared interface and type-layout carries `BuiltinDecoration`" would make this observable test stable.                                                                                                                                                                 |                                                                                                                                    |
| (unspecified)                                                                                                                   | drift-from-source     | The `Loop and branch hints` row for `ForceUnroll` lists AST origin as `[ForceUnroll]` attribute, but the actual checker rejects `[ForceUnroll]` at function scope: `attribute 'ForceUnroll' is not valid here`. The attribute appears to be valid only on loop statements. A clarifying note that `ForceUnroll` is a loop-statement-only attribute (and a list of where it's valid) would prevent misleading test attempts. This bundle does not include a `ForceUnroll` test because of this confusion.                                                                                                                 |                                                                                                                                    |
| [#entrypoint](../../../design/ir-reference/decorations.md#entrypoint)                                                           | undocumented-behavior | The doc lists `entryPoint`'s profile operand as `profileInst: IRIntLit`, but the integer-to-stage mapping (compute=6, vertex=1, ...) is not enumerated in the doc.                                                                                                                                                                                                                                                                                                                                                                                                                                                       | A note pointing at the `Stage` enum that produces these tags would let tests pin the exact integer instead of wildcarding.         |
| [#branch-flatten-loopcontrol](../../../design/ir-reference/decorations.md#branch-flatten-loopcontrol)                           | ambiguous-claim       | The notable-opcodes section says the control-flow hints are "consumed by the backend emit step to choose the corresponding target control-flow construct" but does not name the construct per backend. HLSL's same-named attributes and SPIR-V's selection-control masks are observable, but what `loopControl` maps to on SPIR-V, GLSL, Metal, or WGSL cannot be anchored from the doc alone.                                                                                                                                                                                                                            | Add a small mapping table: hint to per-target construct (HLSL `[branch]`/`[flatten]`/`[unroll]`/`[loop]` attributes, SPIR-V `OpSelectionMerge` `Flatten`/`DontFlatten` and `OpLoopMerge` loop-control masks), and name the targets where the hint is dropped. |
| [#builtinrequirementdecoration](../../../design/ir-reference/decorations.md#builtinrequirementdecoration)                       | missing-surface       | The section names the AST `BuiltinRequirementModifier` as the decoration's origin but no user-level Slang syntax that produces it; a doc-only reader cannot write a shader that pins the decoration to a user-named anchor.                                                                                                                                                                                                                                                                                                                                                                                              | Name the user-observable route (e.g. whether declaring a type conforming to `IDifferentiable` materializes a decorated `Differential` requirement key in the linked IR), or state explicitly that only core-module built-in interfaces produce it.            |
