; Counting loop passing state through block parameters instead of phi nodes. ; expect: accept ; phase: 0 ; spec: docs/spec/07-air.md module test.loop_block_params air 0 lang 0.1 features [] fn @count(%n: u64) -> u64 effects [] entry: %zero = const.u64 0 br @loop(%zero) loop(%i: u64): %done = ge.u64 %i, %n cbr %done, @exit(%i), @body(%i) body(%j: u64): %one = const.u64 1 %next = add.checked.u64 %j, %one br @loop(%next) exit(%r: u64): ret %r