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 test: dont optimize to invalid bitcasts 2024-06-24 16:54:18 -07:00
dont-invalid-bitcast-x86_64.rs test: dont optimize to invalid bitcasts 2024-06-24 16:54:18 -07:00
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 Update std::simd usage and test outputs 2023-11-26 09:02:25 -05:00
libm_no_std_cant_float.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
libm_std_can_float.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
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 Show number in error message even for one error 2023-11-24 19:15:52 +01:00
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 Show number in error message even for one error 2023-11-24 19:15:52 +01:00
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 Show number in error message even for one error 2023-11-24 19:15:52 +01:00
type-generic-monomorphisation-power-of-two.rs fix use of platform_intrinsics in tests 2024-02-25 08:15:44 +01:00
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 Show number in error message even for one error 2023-11-24 19:15:52 +01:00
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 Show number in error message even for one error 2023-11-24 19:15:52 +01:00
wasm-simd-indirect.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00