-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
value_kind
classification for function
cases only looks at first case
#13118
Comments
The Flambda 2 uses it for at least one feature (cross-function unboxing), so I think it makes sense to fix the bug and keep the information. |
Thanks for the context. In that case, this does not seem urgent w.r.t. the current release cycle and I'll sync with @goldfirere on his design comments before posting a PR to fix this. |
This code added in #12236 is buggy in the first
Tfunction_cases
case:ocaml/lambda/translcore.ml
Lines 725 to 734 in 564b2db
For a concrete example, take this example, where the first case's return kind is
Pintval
and the second isPfloatval
:trunk
finds that the returnvalue_kind
isPintval
when it should really bePgenval
.I'm not sure what the impact is. I intend on posting a fix next week after soliciting a design opinion from a colleague, but if someone deems it urgent to fix this faster than that, you can refer to this PR which fixes the bug (perhaps not with the most elegant design) on one of Jane Street's branches: ocaml-flambda/flambda-backend#2471
The text was updated successfully, but these errors were encountered: