summaryrefslogtreecommitdiff
path: root/compiler/PureMicroPasses.ml
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/PureMicroPasses.ml')
-rw-r--r--compiler/PureMicroPasses.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/PureMicroPasses.ml b/compiler/PureMicroPasses.ml
index 335336be..937c9103 100644
--- a/compiler/PureMicroPasses.ml
+++ b/compiler/PureMicroPasses.ml
@@ -1028,10 +1028,13 @@ let decompose_loops (def : fun_decl) : fun_decl * fun_decl list =
let fuel = if !Config.use_fuel then 1 else 0 in
let num_inputs = List.length loop.inputs in
let num_fwd_inputs_with_fuel_no_state = fuel + num_inputs in
- let num_fwd_inputs_with_fuel_with_state =
+ let fwd_state =
fun_sig_info.num_fwd_inputs_with_fuel_with_state
- fun_sig_info.num_fwd_inputs_with_fuel_no_state
in
+ let num_fwd_inputs_with_fuel_with_state =
+ num_fwd_inputs_with_fuel_no_state + fwd_state
+ in
{
has_fuel = !Config.use_fuel;
num_fwd_inputs_with_fuel_no_state;