Skip to content

Commit

Permalink
flambda-backend: Fix split_default_wrapper which did not trigger anym…
Browse files Browse the repository at this point in the history
…ore with flambda2 (ocaml-flambda#970)
  • Loading branch information
Ekdohibs authored Nov 22, 2022
1 parent 8fb75bd commit 7c7d75a
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions lambda/simplif.ml
Original file line number Diff line number Diff line change
Expand Up @@ -740,22 +740,7 @@ let split_default_wrapper ~id:fun_id ~kind ~params ~return ~body
| Llet(Strict, k, id,
(Lifthenelse(Lprim (Pisint _, [Lvar optparam], _), _, _, _) as def),
rest) when
(not (Clflags.is_flambda2 ()))
&& Ident.name optparam = "*opt*" && List.mem_assoc optparam params
&& not (List.mem_assoc optparam map)
->
let wrapper_body, inner = aux ((optparam, id) :: map) add_region rest in
Llet(Strict, k, id, def, wrapper_body), inner
| Llet(Strict, k, id,
(Lswitch(Lvar optparam,
{sw_numconsts = 1;
sw_consts = [_];
sw_numblocks = 1;
sw_blocks = [_];
sw_failaction = None}, _dbg, _)
as def), rest) when
Clflags.is_flambda2 ()
&& Ident.name optparam = "*opt*" && List.mem_assoc optparam params
Ident.name optparam = "*opt*" && List.mem_assoc optparam params
&& not (List.mem_assoc optparam map)
->
let wrapper_body, inner = aux ((optparam, id) :: map) add_region rest in
Expand Down

0 comments on commit 7c7d75a

Please sign in to comment.