-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Tracking issue for booleans #1133
Comments
Edit: @jyn514 removed it from the list. |
* Legalize stack_{load,store}.i8, fixes #433 * Legalize select.i8, cc: #466 * Legalize brz.i8 and brnz.i8, cc: #1117
|
Looking for a good first bug to work on, do people thing this is a good one to get started hacking Cranelift? If so, could someone give me a pointer on how to start addressing this issue? |
We are currently in the process of switching to a new framework for backends. I am not quite sure what has already been implemented in the new backends and what hasn't. |
Is the process complete? |
Yes, we're currently using the new backend. It looks like the lowering for (We still have some holes in supported-operand-types coverage for CLIF that is outside of what the Wasm frontend generates, and the Wasm frontend doesn't use Cranelift-level bools, so that's probably why this still isn't implemented. Sorry about that!) |
And looking at the other items in this issue - currently we do not allow loads and stores of scalar booleans; this has been discussed at length in #3205, together with other aspects of the boolean types. |
Indeed (re: above), bools are fairly well supported now; I think we can probably close this tracking issue. The broader issue of what we want to do about bool representations in #3205 should continue regardless, as we still need to pin down some details of what we want at the CLIF-semantics level. |
See vaguely #1110, #1045, and jyn514/saltwater#92. An easy way to do this might be to convert from bool -> int -> bool and back as suggested in https://github.com/CraneStation/cranelift/issues/922#issuecomment-523931097.
Only occurs if you return the value (maybe would also happen for function calls?)
Note: this only occurs when the values are
i8
, not fori32
, and it occurs during codegen, not verification.store
bor
The text was updated successfully, but these errors were encountered: