Skip to content

low.copy

← low dialect

Explicit virtual-register copy used by lowering and allocation. Each copy produces a fresh virtual-register identity and may constrain the result to a different target register class with the same unit count and semantic value type.

Operation contract

Property Value
Semantic phase executable
Traits StorageRelation

Signature

Kind Name Type Cardinality Description
Operand source register required —
Result result register required — Produces a fresh allocation.
Attribute detached bool default False Prefer physical storage disjoint from the copy source. This placement preference does not require a materialized copy when allocation reuses the source storage.

Examples

%copy = low.copy %value : reg<amdgpu.vgpr x1> -> reg<amdgpu.vgpr x1>