Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes
__m{64, 128i, 256i}
types instead of aliases and allows us to change therepr
of these types without breaking client code. It also means that the only things users can do with these types is convert from/into them from other types (nosplat
, no operators, noextract
,replace
,store
, etc.).It also changes two places where the
__m
/i_x_
types were previously used but the other types make more sense:_mm_slli_si128
,_mm_bslli_si128
,_mm_bsrli_si128
,_mm_srli_si128
intrinsics shift bytes (so it makes sense for them to takei8x16
as an argument)._mm_cmpestrm
works on bits, bytes,u16
, ... depends on themode
argument, so returning a__m128i
makes more sense than anu8x16
(also for consistency with the other string manipulation intrinsics which already do this).This partially fixes #214 . The only part of that issue that remains open is whether we should rename these types to something else (e.g.
i1x64
,i1x128
,i1x256
), but there is no consensus about this yet and that should be done in a different PR anyways.This PR also:
assert_instr
macro and I did not know if that was on purpose or an oversight, so I had to check them all. We were already doing this for some intrinsics but should probably try to be more disciplined about it.mem::uninitialized
/mem::transmute
, probably from the times where we did not have the intrinsics to create uninitialized vectors orfrom/into
.