All instructions

13 SVE · interleave

ZIP1

Elements 0 and 1 of each source alternate into the destination — the low half only.

Instruction
zip1 z0.s, z1.s, z2.s

Types: z0.s, z1.s, z2.s — 32-bit float, 4 lanes each. Drawn at SVL = 128 bits; zip1 interleaves the low half (2 + 2 elements). At SVL = 512 the low half is 8 + 8.

z1.s

z2.s

z0.s

· · · ·

z0 ← low half of z1 interleaved with low half of z2

Ready. z0.s will be rebuilt by interleaving the low halves.

Arrow keys step, space plays or pauses.

Reading the picture

  1. Low half and high half

    zip1 takes elements 0 and 1 of each source and writes them alternately: z1, z2, z1, z2. The dimmed high half — lanes 2 and 3 — never moves. zip2 takes that half; together they turn two contiguous streams into one interleaved stream.

  2. Why interleave

    uzp1 splits an interleaved stream apart. zip1 is the way back: stereo samples, paired channels, anything that has to leave memory interleaved. Play UZP1

  3. No predicate here

    zip moves whole vectors, so there is no p0. Every element is data being shuffled, not work being masked — UZP1, TBL, and FMLAL are the other unpredicated instruction pages here.

This pass interleaves z1.s = {1, 3, 8, 9} and z2.s = {2, 4, 7, 6}.