Chris Fallin
Chris Fallin
I've just added this to the agenda for Monday's public Cranelift biweekly meeting as well.
That's a good point; the distinction between the two is pretty confusing, so if we could remove `raw_bitcast` as well and have only one kind of bitcast, all the better.
> Why not have `b1` store all ones? So my thought process is: `b1` is, semantically, one bit wide; so "all ones" is just `0x01`. But because memory is byte-oriented,...
I should probably add another possibility too: we could define all of `b1`..`b128` to use `0` for false and `1` for true. The main reason for the all-ones representation, to...
Ah, here is one example of a dependence on all-ones in cg_clif: [link](https://github.com/bjorn3/rustc_codegen_cranelift/blob/75eff64977ff149ead73bc0077bac5872d599aa2/src/intrinsics/mod.rs#L293) (linked by @afonso360 in #3003)
@abrown this has me thinking further: the existing Wasm-SIMD implementation (lowering in `cranelift-wasm` specifically) does not use `b128` (or any other boolean type), right? So one fundamental question I have...
@akirilov-arm indeed, that was more or less my point as well -- in the past it has been described as all-ones "because SIMD" and e.g. see the `raw_bitcast` linked above...
Thanks @elliottt -- I think the above is largely a good plan and will result in nice simplifications and removal of awkward special cases! > `x = load.i8 ...; brz...
Thanks! This is the result of [this rewrite rule](https://github.com/bytecodealliance/wasmtime/blob/4639e85c4e9a084ff442e2ff7924b5d753e63be5/cranelift/codegen/src/opts/algebraic.isle#L10-L11): ```lisp (rule (simplify (uextend $I64 (iconst $I32 imm))) (iconst $I64 imm)) ``` coupled with lack of masking on the bits. As...
@pepyakin , thanks for this change. However, I'm not sure that we want to take it as-is; or at least, I'd like to see more data. The Sightglass runs you...