← All examples

SIMD ruled out

A branch on.target rules out is "not compiled at all", so a 256-bit vector there is not judged against this 128-bit target; the hand-written fallback runs.

simd_ruled_out.zg
# A branch `on.target` rules out is "not compiled at all" (owner, 2026-10-06), so a 256-bit vector
# there is not judged against this 128-bit target; the hand-written fallback runs (owner,
# 2026-10-07: a vector the target lacks is refused, and a fallback is written by hand).
MAIN {
    on.target.chip x86_64 {
        let 'w': simd[int32, 8] = simd.fill[value 1];
    } else {
        let 'v': simd[int32, 4] = simd.fill[value 1];
        print.useful[simd.sum['v'], newln];
    }
}
Output
4