1
Fork 0
rust/tests/ui/simd
Chris Denton d15c603173
Rollup merge of #137953 - RalfJung:simd-intrinsic-masks, r=WaffleLapkin
simd intrinsics with mask: accept unsigned integer masks, and fix some of the errors

It's not clear at all why the mask would have to be signed, it is anyway interpreted bitwise. The backend should just make sure that works no matter the surface-level type; our LLVM backend already does this correctly. The note of "the mask may be widened, which only has the correct behavior for signed integers" explains... nothing? Why can't the code do the widening correctly? If necessary, just cast to the signed type first...

Also while we are at it, fix the errors. For simd_masked_load/store, the errors talked about the "third argument" but they meant the first argument (the mask is the first argument there). They also used the wrong type for `expected_element`.

I have extremely low confidence in the GCC part of this PR.

See [discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/257879-project-portable-simd/topic/On.20the.20sign.20of.20masks)
2025-04-20 13:02:48 +00:00
..
intrinsic Rollup merge of #137953 - RalfJung:simd-intrinsic-masks, r=WaffleLapkin 2025-04-20 13:02:48 +00:00
array-trait.rs remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
array-trait.stderr Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
array-type.rs remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
const-err-trumps-simd-err.rs Ban non-array SIMD 2024-09-09 19:39:43 -07:00
const-err-trumps-simd-err.stderr Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
dont-invalid-bitcast-masks.rs
dont-invalid-bitcast-x86_64.rs
empty-simd-vector-in-operand.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
empty-simd-vector-in-operand.stderr fix: running the test only on x86_64. 2025-03-23 19:42:14 +01:00
generics.rs remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
issue-17170.rs Ban non-array SIMD 2024-09-09 19:39:43 -07:00
issue-32947.rs run some tests on emscripten again 2025-02-24 19:48:24 +01:00
issue-39720.rs remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
issue-85915-simd-ptrs.rs remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
issue-89193.rs remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
issue-105439.rs remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
libm_no_std_cant_float.rs
libm_no_std_cant_float.stderr
libm_std_can_float.rs
masked-load-store-build-fail.rs simd intrinsics with mask: accept unsigned integer masks 2025-04-20 12:25:27 +02:00
masked-load-store-build-fail.stderr simd intrinsics with mask: accept unsigned integer masks 2025-04-20 12:25:27 +02:00
masked-load-store-check-fail.rs remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
masked-load-store-check-fail.stderr remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
masked-load-store.rs remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
monomorphize-heterogeneous.rs Ban non-array SIMD 2024-09-09 19:39:43 -07:00
monomorphize-heterogeneous.stderr Ban non-array SIMD 2024-09-09 19:39:43 -07:00
monomorphize-shuffle-index.generic.stderr remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
monomorphize-shuffle-index.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
monomorphize-too-long.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
monomorphize-too-long.stderr Ban non-array SIMD 2024-09-09 19:39:43 -07:00
monomorphize-zero-length.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
monomorphize-zero-length.stderr Ban non-array SIMD 2024-09-09 19:39:43 -07:00
not-out-of-bounds.rs simd_shuffle: require index argument to be a vector 2024-09-14 14:43:24 +02:00
not-out-of-bounds.stderr simd_shuffle: require index argument to be a vector 2024-09-14 14:43:24 +02:00
portable-intrinsics-arent-exposed.rs
portable-intrinsics-arent-exposed.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
repr_packed.rs remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
shuffle.rs remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
simd-bitmask-notpow2.rs remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
simd-bitmask.rs remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
size-align.rs
target-feature-mixup.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
type-generic-monomorphisation-empty.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
type-generic-monomorphisation-empty.stderr
type-generic-monomorphisation-extern-nonnull-ptr.rs Update tests. 2025-01-07 16:04:14 +01:00
type-generic-monomorphisation-non-primitive.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
type-generic-monomorphisation-non-primitive.stderr
type-generic-monomorphisation-oversized.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
type-generic-monomorphisation-oversized.stderr
type-generic-monomorphisation-power-of-two.rs
type-generic-monomorphisation-wide-ptr.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
type-generic-monomorphisation-wide-ptr.stderr Ban non-array SIMD 2024-09-09 19:39:43 -07:00
type-generic-monomorphisation.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
type-generic-monomorphisation.stderr
type-len.rs Ban non-array SIMD 2024-09-09 19:39:43 -07:00
type-len.stderr Ban non-array SIMD 2024-09-09 19:39:43 -07:00
type-wide-ptr.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
type-wide-ptr.stderr
wasm-simd-indirect.rs