Skip to content

All-float# records #1769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Sep 20, 2023
21 changes: 17 additions & 4 deletions backend/cmmgen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ let rec expr_size env = function
expr_size env body
| Uprim(Pmakeblock (_, _, _, mode), args, _) ->
RHS_block (mode, List.length args)
| Uprim(Pmakeufloatblock (_, mode), args, _) ->
RHS_floatblock (mode, List.length args)
| Uprim(Pmakearray((Paddrarray | Pintarray), _, mode), args, _) ->
RHS_block (mode, List.length args)
| Uprim(Pmakearray(Pfloatarray, _, mode), args, _) ->
Expand All @@ -217,7 +219,7 @@ let rec expr_size env = function
assert false
| Uprim (Pduprecord (Record_inlined (_, Variant_extensible), sz), _, _) ->
RHS_block (Lambda.alloc_heap, sz + 1)
| Uprim (Pduprecord (Record_float, sz), _, _) ->
| Uprim (Pduprecord ((Record_float | Record_ufloat), sz), _, _) ->
RHS_floatblock (Lambda.alloc_heap, sz)
| Uprim (Pccall { prim_name; _ }, closure::_, _)
when prim_name = "caml_check_value_is_closure" ->
Expand Down Expand Up @@ -617,10 +619,13 @@ let rec transl env e =
begin match (simplif_primitive prim, args) with
| (Pread_symbol sym, []) ->
Cconst_symbol (global_symbol sym, dbg)
| (Pmakeblock _, []) ->
| ((Pmakeblock _ | Pmakeufloatblock _), []) ->
assert false
| (Pmakeblock(tag, _mut, _kind, mode), args) ->
make_alloc ~mode dbg tag (List.map (transl env) args)
| (Pmakeufloatblock(_mut, mode), args) ->
make_float_alloc ~mode dbg Obj.double_array_tag
(List.map (transl env) args)
| (Pccall prim, args) ->
transl_ccall env prim args dbg
| (Pduparray (kind, _), [Uprim (Pmakearray (kind', _, _), args, _dbg)]) ->
Expand Down Expand Up @@ -712,6 +717,7 @@ let rec transl env e =
| Pbswap16 | Pint_as_pointer _ | Popaque | Pfield _
| Psetfield (_, _, _) | Psetfield_computed (_, _)
| Pfloatfield _ | Psetfloatfield (_, _) | Pduprecord (_, _)
| Pufloatfield _ | Psetufloatfield (_, _)
| Praise _ | Pdivint _ | Pmodint _ | Pintcomp _ | Poffsetint _
| Pcompare_ints | Pcompare_floats | Pcompare_bints _
| Poffsetref _ | Pfloatcomp _ | Parraylength _
Expand Down Expand Up @@ -976,6 +982,8 @@ and transl_prim_1 env p arg dbg =
| Pfloatfield (n,mode) ->
let ptr = transl env arg in
box_float dbg mode (floatfield n ptr dbg)
| Pufloatfield n ->
get_field env Punboxed_float (transl env arg) n dbg
| Pint_as_pointer _ ->
int_as_pointer (transl env arg) dbg
(* Exceptions *)
Expand Down Expand Up @@ -1046,6 +1054,7 @@ and transl_prim_1 env p arg dbg =
| Pbytesrefs | Pbytessets | Pisout | Pread_symbol _
| Pmakeblock (_, _, _, _) | Psetfield (_, _, _) | Psetfield_computed (_, _)
| Psetfloatfield (_, _) | Pduprecord (_, _) | Pccall _ | Pdivint _
| Pmakeufloatblock (_, _) | Psetufloatfield (_, _)
| Pmodint _ | Pintcomp _ | Pfloatcomp _ | Pmakearray (_, _, _)
| Pcompare_ints | Pcompare_floats | Pcompare_bints _
| Pduparray (_, _) | Parrayrefu _ | Parraysetu _
Expand All @@ -1070,7 +1079,10 @@ and transl_prim_2 env p arg1 arg2 dbg =
let ptr = transl env arg1 in
let float_val = transl_unbox_float dbg env arg2 in
setfloatfield n init ptr float_val dbg

| Psetufloatfield (n, init) ->
let ptr = transl env arg1 in
let float_val = transl env arg2 in
setfloatfield n init ptr float_val dbg
(* Boolean operations *)
| Psequand ->
let dbg' = Debuginfo.none in
Expand Down Expand Up @@ -1226,7 +1238,7 @@ and transl_prim_2 env p arg1 arg2 dbg =
| Pabsfloat _ | Pstringlength | Pbyteslength | Pbytessetu | Pbytessets
| Pisint | Pbswap16 | Pint_as_pointer _ | Popaque | Pread_symbol _
| Pmakeblock (_, _, _, _) | Pfield _ | Psetfield_computed (_, _)
| Pfloatfield _
| Pmakeufloatblock (_, _) | Pfloatfield _ | Pufloatfield _
| Pduprecord (_, _) | Pccall _ | Praise _ | Poffsetint _ | Poffsetref _
| Pmakearray (_, _, _) | Pduparray (_, _) | Parraylength _ | Parraysetu _
| Parraysets _ | Pbintofint _ | Pintofbint _ | Pcvtbint (_, _, _)
Expand Down Expand Up @@ -1284,6 +1296,7 @@ and transl_prim_3 env p arg1 arg2 arg3 dbg =
| Pbswap16 | Pint_as_pointer _ | Popaque | Pread_symbol _
| Pmakeblock (_, _, _, _)
| Pfield _ | Psetfield (_, _, _) | Pfloatfield _ | Psetfloatfield (_, _)
| Pmakeufloatblock (_, _) | Pufloatfield _ | Psetufloatfield (_, _)
| Pduprecord (_, _) | Pccall _ | Praise _ | Pdivint _ | Pmodint _ | Pintcomp _
| Pcompare_ints | Pcompare_floats | Pcompare_bints _
| Poffsetint _ | Poffsetref _ | Pfloatcomp _ | Pmakearray (_, _, _)
Expand Down
24 changes: 23 additions & 1 deletion middle_end/clambda_primitives.ml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@ type primitive =
| Pread_symbol of string
(* Operations on heap blocks *)
| Pmakeblock of int * mutable_flag * block_shape * alloc_mode
| Pmakeufloatblock of mutable_flag * alloc_mode
| Pfield of int * layout
| Pfield_computed
| Psetfield of int * immediate_or_pointer * initialization_or_assignment
| Psetfield_computed of immediate_or_pointer * initialization_or_assignment
| Pfloatfield of int * alloc_mode
| Psetfloatfield of int * initialization_or_assignment
| Pufloatfield of int
| Psetufloatfield of int * initialization_or_assignment
| Pduprecord of Types.record_representation * int
(* External call *)
| Pccall of Primitive.description
Expand Down Expand Up @@ -212,4 +215,23 @@ let result_layout (p : primitive) =
| Punbox_int bi -> Lambda.Punboxed_int bi
| Pccall {prim_native_repr_res = (_, repr_res); _} ->
Lambda.layout_of_native_repr repr_res
| _ -> Lambda.layout_any_value
| Pufloatfield _ -> Lambda.Punboxed_float
| Pread_symbol _ | Pmakeblock _ | Pmakeufloatblock _ | Pfield _
| Pfield_computed | Psetfield _ | Psetfield_computed _ | Pfloatfield _
| Psetfloatfield _ | Psetufloatfield _ | Pduprecord _ | Praise _
| Psequand | Psequor | Pnot | Pnegint | Paddint | Psubint | Pmulint
| Pdivint _ | Pmodint _ | Pandint | Porint | Pxorint | Plslint | Plsrint
| Pasrint | Pintcomp _ | Pcompare_ints | Pcompare_floats | Pcompare_bints _
| Poffsetint _ | Poffsetref _ | Pintoffloat | Pfloatofint _ | Pnegfloat _
| Pabsfloat _ | Paddfloat _ | Psubfloat _ | Pmulfloat _ | Pdivfloat _
| Pfloatcomp _ | Pstringlength | Pstringrefu | Pstringrefs
| Pbyteslength | Pbytesrefu | Pbytessetu | Pbytesrefs | Pbytessets
| Pmakearray _ | Pduparray _ | Parraylength _ | Parrayrefu _ | Parraysetu _
| Parrayrefs _ | Parraysets _ | Pisint | Pisout | Pbintofint _ | Pintofbint _
| Pcvtbint _ | Pnegbint _ | Paddbint _ | Psubbint _ | Pmulbint _ | Pdivbint _
| Pmodbint _ | Pandbint _ | Porbint _ | Pxorbint _ | Plslbint _ | Plsrbint _
| Pasrbint _ | Pbintcomp _ | Pbigarrayref _ | Pbigarrayset _ | Pbigarraydim _
| Pstring_load _ | Pbytes_load _ | Pbytes_set _ | Pbigstring_load _
| Pbigstring_set _ | Pbswap16 | Pbbswap _ | Pint_as_pointer _ | Popaque
| Pprobe_is_enabled _ | Pbox_float _ | Pbox_int _ | Pget_header _
-> Lambda.layout_any_value
3 changes: 3 additions & 0 deletions middle_end/clambda_primitives.mli
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@ type primitive =
| Pread_symbol of string
(* Operations on heap blocks *)
| Pmakeblock of int * mutable_flag * block_shape * alloc_mode
| Pmakeufloatblock of mutable_flag * alloc_mode
| Pfield of int * layout
| Pfield_computed
| Psetfield of int * immediate_or_pointer * initialization_or_assignment
| Psetfield_computed of immediate_or_pointer * initialization_or_assignment
| Pfloatfield of int * alloc_mode
| Psetfloatfield of int * initialization_or_assignment
| Pufloatfield of int
| Psetufloatfield of int * initialization_or_assignment
| Pduprecord of Types.record_representation * int
(* External call *)
| Pccall of Primitive.description
Expand Down
5 changes: 5 additions & 0 deletions middle_end/convert_primitives.ml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ let convert (prim : Lambda.primitive) : Clambda_primitives.primitive =
Pmakeblock (tag, mutability, shape, mode)
| Pmakefloatblock (mutability, mode) ->
Pmakearray (Pfloatarray, mutability, mode)
| Pmakeufloatblock (mutability, mode) ->
Pmakeufloatblock (mutability, mode)
| Pfield (field, _sem) -> Pfield (field, Pvalue Pgenval)
| Pfield_computed _sem -> Pfield_computed
| Psetfield (field, imm_or_pointer, init_or_assign) ->
Expand All @@ -37,6 +39,9 @@ let convert (prim : Lambda.primitive) : Clambda_primitives.primitive =
| Pfloatfield (field, _sem, mode) -> Pfloatfield (field, mode)
| Psetfloatfield (field, init_or_assign) ->
Psetfloatfield (field, init_or_assign)
| Pufloatfield (field, _sem) -> Pufloatfield field
| Psetufloatfield (field, init_or_assign) ->
Psetufloatfield (field, init_or_assign)
| Pduprecord (repr, size) -> Pduprecord (repr, size)
| Pccall prim -> Pccall prim
| Praise kind -> Praise kind
Expand Down
47 changes: 25 additions & 22 deletions middle_end/flambda2/from_lambda/closure_conversion.ml
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,8 @@ let close_primitive acc env ~let_bound_ids_with_kinds named
| Some exn_continuation -> exn_continuation
in
close_raise0 acc env ~raise_kind ~arg ~dbg exn_continuation
| (Pmakeblock _ | Pmakefloatblock _ | Pmakearray _), [] ->
| (Pmakeblock _ | Pmakefloatblock _ | Pmakeufloatblock _ | Pmakearray _), []
->
(* Special case for liftable empty block or array *)
let acc, sym =
match prim with
Expand All @@ -729,33 +730,35 @@ let close_primitive acc env ~let_bound_ids_with_kinds named
"empty_block"
| Pmakefloatblock _ ->
Misc.fatal_error "Unexpected empty float block in [Closure_conversion]"
| Pmakeufloatblock _ ->
Misc.fatal_error "Unexpected empty float# block in [Closure_conversion]"
| Pmakearray (_, _, _mode) ->
register_const0 acc Static_const.empty_array "empty_array"
| Pbytes_to_string | Pbytes_of_string | Parray_of_iarray
| Parray_to_iarray | Pignore | Pgetglobal _ | Psetglobal _ | Pgetpredef _
| Pfield _ | Pfield_computed _ | Psetfield _ | Psetfield_computed _
| Pfloatfield _ | Psetfloatfield _ | Pduprecord _ | Pccall _ | Praise _
| Psequand | Psequor | Pnot | Pnegint | Paddint | Psubint | Pmulint
| Pdivint _ | Pmodint _ | Pandint | Porint | Pxorint | Plslint | Plsrint
| Pasrint | Pintcomp _ | Pcompare_ints | Pcompare_floats
| Pcompare_bints _ | Poffsetint _ | Poffsetref _ | Pintoffloat
| Pfloatofint _ | Pnegfloat _ | Pabsfloat _ | Paddfloat _ | Psubfloat _
| Pmulfloat _ | Pdivfloat _ | Pfloatcomp _ | Pstringlength | Pstringrefu
| Pstringrefs | Pbyteslength | Pbytesrefu | Pbytessetu | Pbytesrefs
| Pbytessets | Pduparray _ | Parraylength _ | Parrayrefu _ | Parraysetu _
| Parrayrefs _ | Parraysets _ | Pisint _ | Pisout | Pbintofint _
| Pintofbint _ | Pcvtbint _ | Pnegbint _ | Paddbint _ | Psubbint _
| Pmulbint _ | Pdivbint _ | Pmodbint _ | Pandbint _ | Porbint _
| Pxorbint _ | Plslbint _ | Plsrbint _ | Pasrbint _ | Pbintcomp _
| Pbigarrayref _ | Pbigarrayset _ | Pbigarraydim _ | Pstring_load_16 _
| Pstring_load_32 _ | Pstring_load_64 _ | Pbytes_load_16 _
| Pbytes_load_32 _ | Pbytes_load_64 _ | Pbytes_set_16 _ | Pbytes_set_32 _
| Pbytes_set_64 _ | Pbigstring_load_16 _ | Pbigstring_load_32 _
| Pbigstring_load_64 _ | Pbigstring_set_16 _ | Pbigstring_set_32 _
| Pbigstring_set_64 _ | Pctconst _ | Pbswap16 | Pbbswap _
| Pint_as_pointer _ | Popaque _ | Pprobe_is_enabled _ | Pobj_dup
| Pobj_magic _ | Punbox_float | Pbox_float _ | Punbox_int _ | Pbox_int _
| Pget_header _ ->
| Pufloatfield _ | Psetufloatfield _ | Psequand | Psequor | Pnot | Pnegint
| Paddint | Psubint | Pmulint | Pdivint _ | Pmodint _ | Pandint | Porint
| Pxorint | Plslint | Plsrint | Pasrint | Pintcomp _ | Pcompare_ints
| Pcompare_floats | Pcompare_bints _ | Poffsetint _ | Poffsetref _
| Pintoffloat | Pfloatofint _ | Pnegfloat _ | Pabsfloat _ | Paddfloat _
| Psubfloat _ | Pmulfloat _ | Pdivfloat _ | Pfloatcomp _ | Pstringlength
| Pstringrefu | Pstringrefs | Pbyteslength | Pbytesrefu | Pbytessetu
| Pbytesrefs | Pbytessets | Pduparray _ | Parraylength _ | Parrayrefu _
| Parraysetu _ | Parrayrefs _ | Parraysets _ | Pisint _ | Pisout
| Pbintofint _ | Pintofbint _ | Pcvtbint _ | Pnegbint _ | Paddbint _
| Psubbint _ | Pmulbint _ | Pdivbint _ | Pmodbint _ | Pandbint _
| Porbint _ | Pxorbint _ | Plslbint _ | Plsrbint _ | Pasrbint _
| Pbintcomp _ | Pbigarrayref _ | Pbigarrayset _ | Pbigarraydim _
| Pstring_load_16 _ | Pstring_load_32 _ | Pstring_load_64 _
| Pbytes_load_16 _ | Pbytes_load_32 _ | Pbytes_load_64 _ | Pbytes_set_16 _
| Pbytes_set_32 _ | Pbytes_set_64 _ | Pbigstring_load_16 _
| Pbigstring_load_32 _ | Pbigstring_load_64 _ | Pbigstring_set_16 _
| Pbigstring_set_32 _ | Pbigstring_set_64 _ | Pctconst _ | Pbswap16
| Pbbswap _ | Pint_as_pointer _ | Popaque _ | Pprobe_is_enabled _
| Pobj_dup | Pobj_magic _ | Punbox_float | Pbox_float _ | Punbox_int _
| Pbox_int _ | Pget_header _ ->
(* Inconsistent with outer match *)
assert false
in
Expand Down
9 changes: 5 additions & 4 deletions middle_end/flambda2/from_lambda/dissect_letrec.ml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ end
type block_type =
| Normal of int
(* tag *)
| Boxed_float
| Flat_float_record

type block =
{ block_type : block_type;
Expand Down Expand Up @@ -269,7 +269,7 @@ let rec prepare_letrec (recursive_set : Ident.Set.t)
| Lprim (Pmakefloatblock (_, mode), args, _) -> (
assert_not_local ~lam mode;
match current_let with
| Some cl -> build_block cl (List.length args) Boxed_float lam letrec
| Some cl -> build_block cl (List.length args) Flat_float_record lam letrec
| None -> dead_code lam letrec)
| Lprim (Pduprecord (kind, size), args, _) -> (
match current_let with
Expand All @@ -285,7 +285,8 @@ let rec prepare_letrec (recursive_set : Ident.Set.t)
build_block cl size (Normal runtime_tag) arg letrec
| Record_inlined (Extension _, Variant_extensible) ->
build_block cl (size + 1) (Normal 0) arg letrec
| Record_float -> build_block cl size Boxed_float arg letrec
| Record_float | Record_ufloat ->
build_block cl size Flat_float_record arg letrec
| Record_inlined (Extension _, _)
| Record_inlined (Ordinary _, (Variant_unboxed | Variant_extensible))
| Record_unboxed ->
Expand Down Expand Up @@ -568,7 +569,7 @@ let dissect_letrec ~bindings ~body ~free_vars_kind =
let fn =
match block_type with
| Normal _tag -> "caml_alloc_dummy"
| Boxed_float -> "caml_alloc_dummy_float"
| Flat_float_record -> "caml_alloc_dummy_float"
in
let desc = Primitive.simple_on_values ~name:fn ~arity:1 ~alloc:true in
let size : lambda = Lconst (Const_base (Const_int size)) in
Expand Down
19 changes: 10 additions & 9 deletions middle_end/flambda2/from_lambda/lambda_to_flambda.ml
Original file line number Diff line number Diff line change
Expand Up @@ -958,15 +958,16 @@ let primitive_can_raise (prim : Lambda.primitive) =
| Pignore | Pgetglobal _ | Psetglobal _ | Pgetpredef _ | Pmakeblock _
| Pmakefloatblock _ | Pfield _ | Pfield_computed _ | Psetfield _
| Psetfield_computed _ | Pfloatfield _ | Psetfloatfield _ | Pduprecord _
| Psequand | Psequor | Pnot | Pnegint | Paddint | Psubint | Pmulint | Pandint
| Porint | Pxorint | Plslint | Plsrint | Pasrint | Pintcomp _ | Pcompare_ints
| Pcompare_floats | Pcompare_bints _ | Poffsetint _ | Poffsetref _
| Pintoffloat | Pfloatofint _ | Pnegfloat _ | Pabsfloat _ | Paddfloat _
| Psubfloat _ | Pmulfloat _ | Pdivfloat _ | Pfloatcomp _ | Pstringlength
| Pstringrefu | Pbyteslength | Pbytesrefu | Pbytessetu | Pmakearray _
| Pduparray _ | Parraylength _ | Parrayrefu _ | Parraysetu _ | Pisint _
| Pisout | Pbintofint _ | Pintofbint _ | Pcvtbint _ | Pnegbint _ | Paddbint _
| Psubbint _ | Pmulbint _
| Pmakeufloatblock _ | Pufloatfield _ | Psetufloatfield _ | Psequand | Psequor
| Pnot | Pnegint | Paddint | Psubint | Pmulint | Pandint | Porint | Pxorint
| Plslint | Plsrint | Pasrint | Pintcomp _ | Pcompare_ints | Pcompare_floats
| Pcompare_bints _ | Poffsetint _ | Poffsetref _ | Pintoffloat | Pfloatofint _
| Pnegfloat _ | Pabsfloat _ | Paddfloat _ | Psubfloat _ | Pmulfloat _
| Pdivfloat _ | Pfloatcomp _ | Pstringlength | Pstringrefu | Pbyteslength
| Pbytesrefu | Pbytessetu | Pmakearray _ | Pduparray _ | Parraylength _
| Parrayrefu _ | Parraysetu _ | Pisint _ | Pisout | Pbintofint _
| Pintofbint _ | Pcvtbint _ | Pnegbint _ | Paddbint _ | Psubbint _
| Pmulbint _
| Pdivbint { is_safe = Unsafe; _ }
| Pmodbint { is_safe = Unsafe; _ }
| Pandbint _ | Porbint _ | Pxorbint _ | Plslbint _ | Plsrbint _ | Pasrbint _
Expand Down
33 changes: 29 additions & 4 deletions middle_end/flambda2/from_lambda/lambda_to_flambda_primitives.ml
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,11 @@ let convert_lprim ~big_endian (prim : L.primitive) (args : Simple.t list list)
[ Variadic
(Make_block (Naked_floats, mutability, mode), List.map unbox_float args)
]
| Pmakeufloatblock (mutability, mode), _ ->
let args = List.flatten args in
let mode = Alloc_mode.For_allocations.from_lambda mode ~current_region in
let mutability = Mutability.from_lambda mutability in
[Variadic (Make_block (Naked_floats, mutability, mode), args)]
| Pmakearray (array_kind, mutability, mode), _ -> (
let args = List.flatten args in
let mode = Alloc_mode.For_allocations.from_lambda mode ~current_region in
Expand Down Expand Up @@ -714,7 +719,7 @@ let convert_lprim ~big_endian (prim : L.primitive) (args : Simple.t list list)
{ tag = Tag.Scannable.zero;
length = Targetint_31_63.of_int num_fields
}
| Record_float ->
| Record_float | Record_ufloat ->
Naked_floats { length = Targetint_31_63.of_int num_fields }
| Record_inlined (Ordinary { runtime_tag; _ }, Variant_boxed _) ->
Values
Expand Down Expand Up @@ -999,6 +1004,15 @@ let convert_lprim ~big_endian (prim : L.primitive) (args : Simple.t list list)
[ box_float mode
(Binary (Block_load (block_access, mutability), arg, Simple field))
~current_region ]
| Pufloatfield (field, sem), [[arg]] ->
let imm = Targetint_31_63.of_int field in
check_non_negative_imm imm "Pufloatfield";
let field = Simple.const (Reg_width_const.tagged_immediate imm) in
let mutability = convert_field_read_semantics sem in
let block_access : P.Block_access_kind.t =
Naked_floats { size = Unknown }
in
[Binary (Block_load (block_access, mutability), arg, Simple field)]
| ( Psetfield (index, immediate_or_pointer, initialization_or_assignment),
[[block]; [value]] ) ->
let field_kind = convert_block_access_field_kind immediate_or_pointer in
Expand All @@ -1025,6 +1039,17 @@ let convert_lprim ~big_endian (prim : L.primitive) (args : Simple.t list list)
block,
Simple field,
unbox_float value ) ]
| Psetufloatfield (field, initialization_or_assignment), [[block]; [value]] ->
let imm = Targetint_31_63.of_int field in
check_non_negative_imm imm "Psetufloatfield";
let field = Simple.const (Reg_width_const.tagged_immediate imm) in
let block_access : P.Block_access_kind.t =
Naked_floats { size = Unknown }
in
let init_or_assign = convert_init_or_assign initialization_or_assignment in
[ Ternary
(Block_set (block_access, init_or_assign), block, Simple field, value)
]
| Pdivint Unsafe, [[arg1]; [arg2]] ->
[Binary (Int_arith (I.Tagged_immediate, Div), arg1, arg2)]
| Pdivint Safe, [[arg1]; [arg2]] ->
Expand Down Expand Up @@ -1284,7 +1309,7 @@ let convert_lprim ~big_endian (prim : L.primitive) (args : Simple.t list list)
| Pduparray _ | Pfloatfield _ | Pcvtbint _ | Poffsetref _ | Pbswap16
| Pbbswap _ | Pisint _ | Pint_as_pointer _ | Pbigarraydim _ | Pobj_dup
| Pobj_magic _ | Punbox_float | Pbox_float _ | Punbox_int _ | Pbox_int _
| Pget_header _ ),
| Pget_header _ | Pufloatfield _ ),
([] | _ :: _ :: _ | [([] | _ :: _ :: _)]) ) ->
Misc.fatal_errorf
"Closure_conversion.convert_primitive: Wrong arity for unary primitive \
Expand All @@ -1298,8 +1323,8 @@ let convert_lprim ~big_endian (prim : L.primitive) (args : Simple.t list list)
| Pbytes_load_32 _ | Pbytes_load_64 _ | Pisout | Paddbint _ | Psubbint _
| Pmulbint _ | Pandbint _ | Porbint _ | Pxorbint _ | Plslbint _
| Plsrbint _ | Pasrbint _ | Pfield_computed _ | Pdivbint _ | Pmodbint _
| Psetfloatfield _ | Pbintcomp _ | Pbigstring_load_16 _
| Pbigstring_load_32 _ | Pbigstring_load_64 _
| Psetfloatfield _ | Psetufloatfield _ | Pbintcomp _
| Pbigstring_load_16 _ | Pbigstring_load_32 _ | Pbigstring_load_64 _
| Parrayrefu
(Pgenarray_ref _ | Paddrarray_ref | Pintarray_ref | Pfloatarray_ref _)
| Parrayrefs
Expand Down
Loading