Skip to content
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

Unbox_float32 should check custom ops name #3433

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions backend/cmm_helpers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -802,9 +802,10 @@ let box_float32 dbg mode exp =

let unbox_float32 dbg =
map_tail ~kind:Any (function
| Cop (Calloc _, [Cconst_natint (hdr, _); _ops; c], _)
when Nativeint.equal hdr boxedfloat32_header
|| Nativeint.equal hdr boxedfloat32_local_header ->
| Cop (Calloc _, [Cconst_natint (hdr, _); Cconst_symbol (sym, _); c], _)
when (Nativeint.equal hdr boxedfloat32_header
|| Nativeint.equal hdr boxedfloat32_local_header)
&& String.equal sym.sym_name caml_float32_ops ->
c
| Cconst_symbol (s, _dbg) as cmm -> (
match Cmmgen_state.structured_constant_of_sym s.sym_name with
Expand Down
Loading