---
remediation_report: true
remediator_model: claude-opus-5
remediated_at: 2026-08-04T14:05:00Z
target_doc: ir-reference/misc.md
review_report: ../../reviews/ir-reference/misc.md.review.md
target_doc_source_commit_before: 53b76e6d3009b8e6434d41573524c7ce5c499d23
target_doc_source_commit_after: 53b76e6d3009b8e6434d41573524c7ce5c499d23
actions:
  fixed: 6
  rejected_bogus: 0
  rejected_out_of_scope: 1
  deferred: 0
  escalated: 0
---

# Remediation report for ir-reference/misc.md

## Summary
Six findings were fixed and one was rejected as out of scope, so the document
was edited and `mark-fresh` is needed. Both critical findings were confirmed
against the source: the type predicates fold on the unwrapped element type (so
`IsVector` folds to `false` for every concrete type), and the barrier IR carries
a folded numeric bitmask whose C++ `static_assert`s pin only the C++ side. All
16 retired `(synthesized)` origin cells were converted — 15 to named producers
and `nop` to **no producer at HEAD** — so no `(synthesized)` origin remains on
this page. The 12 hand-written wrappers are now marked with `‡`, three operand
cells were restored to the Lua schema, and the obsolete first coverage gap was
deleted.

## Actions
| Finding ID | Action | Rationale | Fix summary |
| --- | --- | --- | --- |
| F-001 | fixed | Confirmed at HEAD. `source/slang/slang-ir-peephole.cpp:1878-1882` reassigns `type` to a vector's, then a matrix's, element type before the predicate switch at 1890-1913, so `kIROp_IsVector` at 1910-1911 tests `as<IRVectorType>` on an already-unwrapped element type and yields `false` for every concrete type. The same unwrap precedes `IsCoopFloat` at `:1922-1926`, which the finding's row range covers but its prose omitted, so that row was corrected too. | Extended the paragraph above the table with the fold's line cites and the element-type/`IsVector` consequence; rewrote the eight predicate summaries (`IsInt` through `IsVector`) so the scalar ones say "or for a vector/matrix of", and `IsVector` states that it folds to `false` for every concrete type. |
| F-002 | fixed | Confirmed. `source/slang/slang-type-system-shared.h:23-37` and `:52-63` compare `BarrierMemoryTypeFlags::UavMemory` and friends against literals in the same header, so nothing references `workgraph.slang`; the enum values at `source/standard-modules/experimental/workgraph.slang:279-283` and `:291-294` are hard-coded separately with no `$(...)` splice. Combined with the page's own (accurate) later paragraph that emission requires an `IRIntLit`, the "symbolic flag value" and "compile error" claims were both wrong. | First callout paragraph now says the IR carries the folded numeric bitmask and the opcode defers only the name choice; the wiring paragraph now says the two enums must be kept in sync manually, cites the sync comments on both sides, and states that the `static_assert`s pin only the C++ side so a Slang-only edit yields wrong HLSL rather than a compile error. |
| F-003 | fixed | All 16 producers traced at HEAD; none was a substitution. `capabilityConjunction` / `capabilityDisjunction`: `IRBuilder::getCapabilityValue` (`source/slang/slang-ir.cpp:2669`, building both at `:2696` and `:2705`), whose only caller is `visitRequireCapabilityStmt` (`source/slang/slang-lower-to-ir.cpp:9629`, call at `:9648`). `makeTensorView` / `TorchGetCudaStream`: the PyTorch binding pass (`source/slang/slang-ir-pytorch-cpp-binding.cpp:465`, `:472`, `:595`, the first two inside `generateCppBindingForFunc` at `:372`). `NonEmptyPackWitness`: `emitNonEmptyPackWitness` (`source/slang/slang-lower-to-ir.cpp:2056`, used at `:2065` and `:2633`). `CastStorageToLogical` / `Deref` / `MakeStorageTypeLoweringConfig`: the buffer-element-type lowering pass, which its own comment at `source/slang/slang-ir-lower-buffer-element-type.cpp:119` calls "a pseudo instruction introduced in this pass" (sites at `:1091`, `:1329`, `:1470`, `:1488`, `:1518`, `:1705`, `:1712`, `:1871`, `:1955`, and `emitTypeLoweringConfigToIR` at `:1174`). `liveRangeStart` / `liveRangeEnd`: the liveness pass (`source/slang/slang-ir-liveness.cpp:632`, `:643`, `:1663`) plus phi elimination (`source/slang/slang-ir-eliminate-phis.cpp:1029`). `DispatchKernel`: `visitDispatchKernelExpr` (`source/slang/slang-lower-to-ir.cpp:5972`, emitting at `:5980`) and the PyTorch binding pass (`:1064`, `:1217`). The four `CompilerDictionary*`: `initializeTranslationDictionary` (`source/slang/slang-ir-translate.cpp:16`, building the dictionary at `:23` and its scope at `:27`), `IRBuilder::_getCompilerDictionaryEntry` (`source/slang/slang-ir.cpp:3371`) and `setCompilerDictionaryEntryValue` / `addCompilerDictionaryEntry` (`:3436`, `:3461`). For `nop`, a full `rg` sweep of `source/` for `kIROp_Nop` found only sentinel assignments and comparisons (for example `source/slang/slang-ir.cpp:4411-4589`, `slang-ir-util.cpp:1381`, `slang-check-stmt.cpp:830`, `slang-ir-inline.cpp:463`) and one dump case at `slang-ir.cpp:9492` — no construction — so the reviewer's conditional **no producer at HEAD** applies. Converted: 16 of 16; remaining: 0. | All 16 `AST origin` cells rewritten with their producing function or pass and line numbers; `nop` marked **no producer at HEAD** with the sentinel-only explanation in its summary; the `## See also` line that referred to "the `(synthesized)` opcodes" reworded to "the pass-produced opcodes above". |
| F-004 | fixed | Verified mechanically: matching each of the 65 row wrapper names against `struct <name>` in `source/slang/slang-ir-insts.h` yields exactly 12 hand-written, agreeing with the page's own prose count. The prose list was also slightly off: it named the abstract parents `IRLiveRangeMarker` (line 2609) and `IRCastStorageToLogicalBase` (2701), which are hand-written but appear only in `## Family hierarchy`, while the two concrete rows are `IRLiveRangeStart` (2629) and `IRLiveRangeEnd` (2649). Every other cited line number checked out (`IRAnnotation` 740, `IRDispatchKernel` 749, `IRTorchTensorGetView` 761, `IRDifferentiableTypeDictionaryItem` 770, `IRAlignOf` 1788, `IRExpand` 2378, `IREach` 2388, `IRIsType` 2635, `IRCompilerDictionaryValue` 3084, `IRCompilerDictionaryEntry` 3090). | Added a trailing `‡` to the 12 hand-written **C++ wrapper** cells; the `## Source` paragraph now defines the marker, lists `IRLiveRangeStart` / `IRLiveRangeEnd` instead of their parent, and notes separately that the two abstract parents are hand-written but never table rows. |
| F-005 | fixed | Confirmed against the Lua file at HEAD: `source/slang/slang-ir-insts.lua:1687` is `{ makeTensorView = {} }` (nullary), `:2961` declares `liveRangeStart = { min_operands = 2 }` with no names, and `:2856` names exactly `baseFn`, `threadGroupSize`, `dispatchSize` with no variadic tail. `docs/generated/design/_meta/prompts/_common.md:238` scopes this column to the Lua entry. Each row's builder discrepancy is preserved: in the `makeTensorView` and `DispatchKernel` summaries, and for `liveRangeStart` in the existing `### liveRangeStart and liveRangeEnd` callout. | Operand cells changed to `—` (`makeTensorView`), `` (variadic, `min=2`) `` matching this page's convention for name-less `min_operands` entries (`liveRangeStart`), and `baseFn, threadGroupSize, dispatchSize` (`DispatchKernel`). |
| F-006 | fixed | Confirmed stale: `WorkGraphRecordTypeBase`, `DispatchNodeInputRecord`, `SPIRVUntypedPtr`, and `UntypedSamplerHandle` all appear in `docs/generated/design/ir-reference/types.md`; `imageGatherOffset` in `resources-and-atomics.md`; `nodeLaunch`, `synthesizedParameterGroup`, and `shader64BitIndexing` in `decorations.md`; and `TypeAlignment` in `metadata.md`. | Deleted the obsolete first-gap sentence and its opcode list; the section now opens with the surviving `nodeOutputRecordGetElementPtr` ownership note. |
| F-007 | rejected-out-of-scope | Correct but not a remediator edit. `docs/generated/design/_meta/prompts/_remediate.md:97-100` reserves `generated_at`, `source_commit`, and `watched_paths_digest` for the operator's `regenerate.py mark-fresh` run and instructs the remediator not to edit them, which is also what the reviewer's recommendation asks for ("do not merely hand-edit the hash"). This page was edited, so `mark-fresh` will record the current digest. | — |
