Loop-invariant code