Skip to content

buffer.fill

buffer dialect

Repeat the raw little-endian bytes of an 8-, 16-, 32-, or 64-bit integer or floating-point scalar across an exact writable byte range. A final partial repetition writes the low-address prefix of the pattern bytes. A zero byte length performs no byte access.

Operation contract

Property Value
Semantic phase executable
Memory effects write target

Signature

Kind Name Type Cardinality Description
Operand pattern byte_pattern_scalar required Raw scalar bit pattern to repeat.
Operand target buffer required Buffer root receiving the pattern.
Operand target_offset offset required Target byte offset.
Operand byte_length offset required Number of bytes to fill.

Examples

buffer.fill %pattern, %target[%target_offset], %byte_length : bf16