summaryrefslogtreecommitdiff
path: root/compiler/PureMicroPasses.ml
diff options
context:
space:
mode:
authorSon Ho2022-12-17 10:50:10 +0100
committerSon HO2023-02-03 11:21:46 +0100
commit464ecbb8d756de32f6d0c14dca4e90e90c76c5bc (patch)
treee382a8f63bb0f650052684cb2300a67a1e40d468 /compiler/PureMicroPasses.ml
parent66638a2a96c7639553a340917b87e26d94265c5e (diff)
Fix a minor bug in Interpreter.ml
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;