Files
aji/tests/conformance/phase0/accept/loop_block_params.air
T
dev 50bf990355 verifier: resource limits, CFG, SSA dominance and types (P0-7..P0-10)
- verifier.zig: staged pipeline per spec 07 §8.6, deterministic order
- budget.zig: fixed limits from spec 08 §7 (E5101)
- cfg.zig: terminators, branch arity, switch/enum.switch shape (E5002)
- ssa.zig: Cooper-Harvey-Kennedy dominators, use dominance (E5001)
- types.zig: operand/result types, casts, calls, returns, recursive
  aggregates (E1001, E1002, E1003)
- check.zig runs parse -> verify; seed conformance tests get module
  headers; tests for unimplemented phases report PENDING
2026-10-04 12:24:41 +03:00

28 lines
481 B
LLVM

; 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