about summary refs log tree commit diff
path: root/src/rustllvm/rustllvm.h
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-01-24 13:11:06 +0000
committerbors <bors@rust-lang.org>2019-01-24 13:11:06 +0000
commit095b44c83b540bb4dbf74be1cae604f4bae87989 (patch)
tree660a01091b2a50604735d6d3ddaa862dadb238c9 /src/rustllvm/rustllvm.h
parentf23b63cbbf8d92deac6b3c39746d3b85d3e838af (diff)
parent785f529d6e91b787d94b44726a5d6018e8fe181b (diff)
downloadrust-095b44c83b540bb4dbf74be1cae604f4bae87989.tar.gz
rust-095b44c83b540bb4dbf74be1cae604f4bae87989.zip
Auto merge of #57269 - gnzlbg:simd_bitmask, r=rkruppe
Add intrinsic to create an integer bitmask from a vector mask

This PR adds a new simd intrinsic: `simd_bitmask(vector) -> unsigned integer` that creates an integer bitmask from a vector mask by extracting one bit of each vector lane.

This is required to implement: https://github.com/rust-lang-nursery/packed_simd/issues/166 .

EDIT: the reason we need an intrinsics for this is that we have to truncate the vector lanes to an `<i1 x N>` vector, and then bitcast that to an `iN` integer (while making sure that we only materialize `i8`, ... , `i64` - that is, no `i1`, `i2`, `i4`, types), and we can't do any of that in a Rust library.

r? @rkruppe
Diffstat (limited to 'src/rustllvm/rustllvm.h')
0 files changed, 0 insertions, 0 deletions