Skip to content

Commit ef161b9

Browse files
Ekdohibsmshinwell
andauthored
flambda-backend: Prepare translation of primitives in lambda_to_flambda for unboxed products (#1465)
Co-authored-by: Mark Shinwell <mshinwell@pm.me>
1 parent bc1d15a commit ef161b9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lambda/lambda.ml

+5-2
Original file line numberDiff line numberDiff line change
@@ -1440,9 +1440,12 @@ let primitive_result_layout (p : primitive) =
14401440
| Paddfloat _ | Psubfloat _ | Pmulfloat _ | Pdivfloat _
14411441
| Pbox_float _ -> layout_float
14421442
| Punbox_float -> Punboxed_float
1443-
| Pccall _p ->
1444-
(* CR ncourant: use native_repr *)
1443+
| Pccall { prim_native_repr_res = _, Untagged_int; _} -> layout_int
1444+
| Pccall { prim_native_repr_res = _, Unboxed_float; _} -> layout_float
1445+
| Pccall { prim_native_repr_res = _, Same_as_ocaml_repr; _} ->
14451446
layout_any_value
1447+
| Pccall { prim_native_repr_res = _, Unboxed_integer bi; _} ->
1448+
layout_boxedint bi
14461449
| Praise _ -> layout_bottom
14471450
| Psequor | Psequand | Pnot
14481451
| Pnegint | Paddint | Psubint | Pmulint

0 commit comments

Comments
 (0)