Skip to content

vector.load.expand

vector dialect

Rank-1 masked expand load from consecutive view elements. Active lanes consume memory densely in increasing lane order; inactive lanes do not consume memory and take the corresponding passthrough lane.

Operation contract

Property Value
Semantic phase
Interfaces MemoryAccess
Memory effects read view

Signature

Kind Name Type Cardinality Description
Operand view view required Typed source view.
Operand mask vector required i1 rank-1 vector mask selecting loaded lanes.
Operand passthrough vector required Value used for inactive lanes.
Operand indices index variadic Dynamic logical origin indices.
Result result vector required Expanded loaded vector value.
Attribute cache_scope enum CacheScope optional Optional cache/coherency scope required by target lowering.
Attribute cache_temporal enum CacheTemporal optional Optional temporal cache policy required by target lowering.
Attribute static_indices i64_array required Static logical origin indices with INT64_MIN sentinels for dynamics.

Verification constraints

  • HasRankOneVector(result)
  • HasI1Element(mask)
  • SameElementType(view, passthrough, result)
  • SameShape(mask, passthrough, result)
  • SameType(passthrough, result)

Examples

%v = vector.load.expand %view[%row, %col], %mask, %old : view<[%m]x[%n]xf32, %layout>, vector<4xi1>, vector<4xf32>