scalar.duplicate
← scalar dialect
Create another local owner of a scalar value. The result has the same logical value as its source and a distinct SSA ownership identity. Allocation may coalesce non-overlapping source and result storage; the operation does not promise disjoint storage.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
UniqueIdentity, StorageRelation |
| Interfaces |
ValueDuplication |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
sources |
any |
variadic |
— |
| Result |
duplicates |
any |
variadic |
— |
Verification constraints
ClosedValueTuple(sources)
ClosedValueTuple(duplicates)
VariadicValuesMatch(duplicates, sources)
Examples
%copy = scalar.duplicate %value : i32