Skip to content

index.constant

index dialect

Materialize a compile-time address-domain constant. The result type must be index for logical coordinates or offset for physical byte counts; fixed-width integer payload constants remain scalar.constant.

Operation contract

Property Value
Semantic phase executable
Traits Pure, ConstantLike

Signature

Kind Name Type Cardinality Description
Result result address required
Attribute value any required The constant integer value.

Verification constraints

  • AttrMatchesElementType(value, result)

Examples

%c0 = index.constant 0 : index
%base = index.constant 0 : offset