1
Fork 0

Rollup merge of #82695 - XAMPPRocky:remove-non-power-of-two-limit, r=nagisa

Revert non-power-of-two vector restriction

Removes the power of two restriction from rustc. As discussed in https://github.com/rust-lang/stdsimd/issues/63

r? ```@calebzulawski```

cc ```@workingjubilee``` ```@thomcc```
This commit is contained in:
Yuki Okushi 2021-03-03 16:27:44 +09:00 committed by GitHub
commit 64b76da4b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 5 additions and 58 deletions

View file

@ -1161,15 +1161,6 @@ pub fn check_simd(tcx: TyCtxt<'_>, sp: Span, def_id: LocalDefId) {
if len == 0 {
struct_span_err!(tcx.sess, sp, E0075, "SIMD vector cannot be empty").emit();
return;
} else if !len.is_power_of_two() {
struct_span_err!(
tcx.sess,
sp,
E0075,
"SIMD vector length must be a power of two"
)
.emit();
return;
} else if len > MAX_SIMD_LANES {
struct_span_err!(
tcx.sess,