simd.shuffle rearranges lanes: the vector, then its new order as lane numbers, which must be fixed numbers known when compiling.
simd_shuffle.zg
# `simd.shuffle` rearranges lanes (owner, 2026-09-27: a): the vector, then its new order as# lane numbers, which must be fixed numbers known when compiling. Reversing, swapping and# copying one lane everywhere are all just orders.MAIN{let'xs':array[int32]=[10,20,30,40];let'v':simd[int32,4]=simd.load[lend'xs',pos1];let'r':=simd.shuffle['v',[4,3,2,1]];# reversedlet'pairs':=simd.shuffle['v',[2,1,4,3]];# neighbours swappedlet'first':=simd.shuffle['v',[1,1,1,1]];# lane 1 everywherestd::print.useful['r',newln,'pairs',newln,'first',newln];}