cfallin commented on issue #3011:
Also, a quick note on impact: wider-than-1-bit bools are not used by
cranelift-wasm
, so we expect this not to impact Wasmtime or Lucet; only embedders that generate CLIF directly (e.g.cg_clif
) should see this change. cc @bjorn3
bjorn3 commented on issue #3011:
cg_clif doesn't use wider than b1 bools either. In fact it doesn't even store clif bools anywhere. It is always the result of a icmp and passed either to bint.i8 to store in memory or brz/brnz to branch. I don't see much value in wider than b1 bools. Bools can't really be directly stored in memory except for spill slots AFAIK, so the width shouldn't matter to the user, right?
cfallin commented on issue #3011:
The intent of wider bools is to potentially act as masks for SIMD operations, if I understand correctly, though I haven't personally seen code that does that. Since they're defined and have well-defined behavior according to the instruction docs, I think it's probably best to keep them for now; we can certain think more about simplification in a separate issue if folks think it would make sense.
abrown commented on issue #3011:
Do we have a place where this invariant is documented, e.g. in the meta crate?
Maybe close to this documentation? It's in need of some updating...
cfallin commented on issue #3011:
It's in need of some updating...
Agreed; at some point (soon?) we need to make a pass through all the docs and fix outdated things. I don't think we've had significant updates since the new backends came into existence. But definitely out of scope for this PR as long as this specific invariant is there :-)
Last updated: Dec 23 2024 at 12:05 UTC