teapotd opened PR #1769 from vconst-boolean-fix
to master
:
Cranelift IR docs for boolean types say:
Several larger boolean types are also defined, primarily to be used as SIMD element types. They can be stored in memory, and are represented as either all zero bits or all one bits.
According to Zulip conversation, this applies only to boolean vector types, and it matches the WASM SIMD spec:
The comparison operations all compare two vectors lane-wise, and produce a mask vector with the same number of lanes as the input interpretation where the bits in each lane are 0 for false and all ones for true.
The
vconst.BxN
instruction currently produces vector with values0
or1
instead of masks. This PR changes it to produce masks.r? @abrown
abrown requested abrown for a review on PR #1769.
abrown submitted PR Review.
abrown merged PR #1769.
Last updated: Dec 23 2024 at 12:05 UTC