fix use of platform_intrinsics in tests
This commit is contained in:
parent
cc3df0af7b
commit
c1d0e489e5
@ -4,17 +4,14 @@
|
|||||||
|
|
||||||
// Test that the simd_f{min,max} intrinsics produce the correct results.
|
// Test that the simd_f{min,max} intrinsics produce the correct results.
|
||||||
|
|
||||||
#![feature(repr_simd, intrinsics)]
|
#![feature(repr_simd, core_intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "intrinsic" {
|
use std::intrinsics::simd::*;
|
||||||
fn simd_fmin<T>(x: T, y: T) -> T;
|
|
||||||
fn simd_fmax<T>(x: T, y: T) -> T;
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let x = f32x4(1.0, 2.0, 3.0, 4.0);
|
let x = f32x4(1.0, 2.0, 3.0, 4.0);
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#![feature(platform_intrinsics, repr_simd)]
|
#![feature(core_intrinsics, repr_simd)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
use std::intrinsics::simd::simd_div;
|
||||||
pub(crate) fn simd_div<T>(x: T, y: T) -> T;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#![feature(platform_intrinsics, repr_simd)]
|
#![feature(core_intrinsics, repr_simd)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
use std::intrinsics::simd::simd_div;
|
||||||
pub(crate) fn simd_div<T>(x: T, y: T) -> T;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#![feature(platform_intrinsics, repr_simd)]
|
#![feature(core_intrinsics, repr_simd)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
use std::intrinsics::simd::simd_reduce_any;
|
||||||
pub(crate) fn simd_reduce_any<T>(x: T) -> bool;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#![feature(platform_intrinsics, repr_simd)]
|
#![feature(core_intrinsics, repr_simd)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
use std::intrinsics::simd::simd_rem;
|
||||||
pub(crate) fn simd_rem<T>(x: T, y: T) -> T;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#![feature(platform_intrinsics, repr_simd)]
|
#![feature(core_intrinsics, repr_simd)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
use std::intrinsics::simd::simd_select_bitmask;
|
||||||
fn simd_select_bitmask<M, T>(m: M, yes: T, no: T) -> T;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#![feature(platform_intrinsics, repr_simd)]
|
#![feature(core_intrinsics, repr_simd)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
use std::intrinsics::simd::simd_select;
|
||||||
fn simd_select<M, T>(m: M, yes: T, no: T) -> T;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#![feature(platform_intrinsics, repr_simd)]
|
#![feature(core_intrinsics, repr_simd)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
use std::intrinsics::simd::simd_shl;
|
||||||
pub(crate) fn simd_shl<T>(x: T, y: T) -> T;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#![feature(platform_intrinsics, repr_simd)]
|
#![feature(core_intrinsics, repr_simd)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
use std::intrinsics::simd::simd_shr;
|
||||||
pub(crate) fn simd_shr<T>(x: T, y: T) -> T;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#![feature(float_gamma, portable_simd, core_intrinsics, platform_intrinsics)]
|
#![feature(float_gamma, portable_simd, core_intrinsics)]
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
@ -525,12 +525,6 @@ fn test_simd() {
|
|||||||
use std::intrinsics::simd::*;
|
use std::intrinsics::simd::*;
|
||||||
use std::simd::*;
|
use std::simd::*;
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
|
||||||
fn simd_fsqrt<T>(x: T) -> T;
|
|
||||||
fn simd_ceil<T>(x: T) -> T;
|
|
||||||
fn simd_fma<T>(x: T, y: T, z: T) -> T;
|
|
||||||
}
|
|
||||||
|
|
||||||
let nan = F32::nan(Neg, Quiet, 0).as_f32();
|
let nan = F32::nan(Neg, Quiet, 0).as_f32();
|
||||||
check_all_outcomes(
|
check_all_outcomes(
|
||||||
HashSet::from_iter([F32::nan(Pos, Quiet, 0), F32::nan(Neg, Quiet, 0)]),
|
HashSet::from_iter([F32::nan(Pos, Quiet, 0), F32::nan(Neg, Quiet, 0)]),
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Separate test without strict provenance
|
// Separate test without strict provenance
|
||||||
//@compile-flags: -Zmiri-permissive-provenance
|
//@compile-flags: -Zmiri-permissive-provenance
|
||||||
#![feature(portable_simd, platform_intrinsics)]
|
#![feature(portable_simd)]
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use std::simd::prelude::*;
|
use std::simd::prelude::*;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//@compile-flags: -Zmiri-strict-provenance
|
//@compile-flags: -Zmiri-strict-provenance
|
||||||
#![feature(portable_simd, platform_intrinsics, adt_const_params, inline_const, core_intrinsics)]
|
#![feature(portable_simd, adt_const_params, inline_const, core_intrinsics)]
|
||||||
#![allow(incomplete_features, internal_features)]
|
#![allow(incomplete_features, internal_features)]
|
||||||
use std::intrinsics::simd as intrinsics;
|
use std::intrinsics::simd as intrinsics;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
@ -216,10 +216,7 @@ fn simd_ops_i32() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn simd_mask() {
|
fn simd_mask() {
|
||||||
extern "platform-intrinsic" {
|
use std::intrinsics::simd::*;
|
||||||
pub(crate) fn simd_bitmask<T, U>(x: T) -> U;
|
|
||||||
pub(crate) fn simd_select_bitmask<M, T>(m: M, yes: T, no: T) -> T;
|
|
||||||
}
|
|
||||||
|
|
||||||
let intmask = Mask::from_int(i32x4::from_array([0, -1, 0, 0]));
|
let intmask = Mask::from_int(i32x4::from_array([0, -1, 0, 0]));
|
||||||
assert_eq!(intmask, Mask::from_array([false, true, false, false]));
|
assert_eq!(intmask, Mask::from_array([false, true, false, false]));
|
||||||
@ -497,9 +494,6 @@ fn simd_round() {
|
|||||||
|
|
||||||
fn simd_intrinsics() {
|
fn simd_intrinsics() {
|
||||||
use intrinsics::*;
|
use intrinsics::*;
|
||||||
extern "platform-intrinsic" {
|
|
||||||
fn simd_shuffle_generic<T, U, const IDX: &'static [u32]>(x: T, y: T) -> U;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
// Make sure simd_eq returns all-1 for `true`
|
// Make sure simd_eq returns all-1 for `true`
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//@ compile-flags: -O --crate-type=rlib
|
//@ compile-flags: -O --crate-type=rlib
|
||||||
#![feature(platform_intrinsics, repr_simd)]
|
#![feature(intrinsics, repr_simd)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_fabs<T>(x: T) -> T;
|
fn simd_fabs<T>(x: T) -> T;
|
||||||
fn simd_eq<T, U>(x: T, y: T) -> U;
|
fn simd_eq<T, U>(x: T, y: T) -> U;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_fabs<T>(x: T) -> T;
|
fn simd_fabs<T>(x: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_ceil<T>(x: T) -> T;
|
fn simd_ceil<T>(x: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_fcos<T>(x: T) -> T;
|
fn simd_fcos<T>(x: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_fexp<T>(x: T) -> T;
|
fn simd_fexp<T>(x: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_fexp2<T>(x: T) -> T;
|
fn simd_fexp2<T>(x: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_floor<T>(x: T) -> T;
|
fn simd_floor<T>(x: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_fma<T>(x: T, b: T, c: T) -> T;
|
fn simd_fma<T>(x: T, b: T, c: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_fsqrt<T>(x: T) -> T;
|
fn simd_fsqrt<T>(x: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_flog<T>(x: T) -> T;
|
fn simd_flog<T>(x: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_flog10<T>(x: T) -> T;
|
fn simd_flog10<T>(x: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_flog2<T>(x: T) -> T;
|
fn simd_flog2<T>(x: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_fmin<T>(x: T, y: T) -> T;
|
fn simd_fmin<T>(x: T, y: T) -> T;
|
||||||
fn simd_fmax<T>(x: T, y: T) -> T;
|
fn simd_fmax<T>(x: T, y: T) -> T;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_fpow<T>(x: T, b: T) -> T;
|
fn simd_fpow<T>(x: T, b: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_fpowi<T>(x: T, b: i32) -> T;
|
fn simd_fpowi<T>(x: T, b: i32) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -25,7 +25,7 @@ pub struct f32x16(pub f32, pub f32, pub f32, pub f32,
|
|||||||
pub f32, pub f32, pub f32, pub f32,
|
pub f32, pub f32, pub f32, pub f32,
|
||||||
pub f32, pub f32, pub f32, pub f32);
|
pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_fsin<T>(x: T) -> T;
|
fn simd_fsin<T>(x: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
#![deny(unused)]
|
#![deny(unused)]
|
||||||
|
|
||||||
@ -111,7 +111,7 @@
|
|||||||
#[repr(simd)] #[derive(Copy, Clone)] pub struct u128x2(u128, u128);
|
#[repr(simd)] #[derive(Copy, Clone)] pub struct u128x2(u128, u128);
|
||||||
#[repr(simd)] #[derive(Copy, Clone)] pub struct u128x4(u128, u128, u128, u128);
|
#[repr(simd)] #[derive(Copy, Clone)] pub struct u128x4(u128, u128, u128, u128);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_saturating_add<T>(x: T, y: T) -> T;
|
fn simd_saturating_add<T>(x: T, y: T) -> T;
|
||||||
fn simd_saturating_sub<T>(x: T, y: T) -> T;
|
fn simd_saturating_sub<T>(x: T, y: T) -> T;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -22,7 +22,7 @@ pub struct i8x16(
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_bitmask<T, U>(x: T) -> U;
|
fn simd_bitmask<T, U>(x: T) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -15,7 +15,7 @@
|
|||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
pub struct Vec4<T>(pub T, pub T, pub T, pub T);
|
pub struct Vec4<T>(pub T, pub T, pub T, pub T);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_gather<T, P, M>(value: T, pointers: P, mask: M) -> T;
|
fn simd_gather<T, P, M>(value: T, pointers: P, mask: M) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -13,7 +13,7 @@
|
|||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
pub struct Vec4<T>(pub T, pub T, pub T, pub T);
|
pub struct Vec4<T>(pub T, pub T, pub T, pub T);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
|
fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -13,7 +13,7 @@
|
|||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
pub struct Vec4<T>(pub T, pub T, pub T, pub T);
|
pub struct Vec4<T>(pub T, pub T, pub T, pub T);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_masked_store<M, P, T>(mask: M, pointer: P, values: T) -> ();
|
fn simd_masked_store<M, P, T>(mask: M, pointer: P, values: T) -> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -15,7 +15,7 @@
|
|||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
pub struct Vec4<T>(pub T, pub T, pub T, pub T);
|
pub struct Vec4<T>(pub T, pub T, pub T, pub T);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_scatter<T, P, M>(value: T, pointers: P, mask: M);
|
fn simd_scatter<T, P, M>(value: T, pointers: P, mask: M);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
pub struct b8x4(pub i8, pub i8, pub i8, pub i8);
|
pub struct b8x4(pub i8, pub i8, pub i8, pub i8);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_select<T, U>(x: T, a: U, b: U) -> U;
|
fn simd_select<T, U>(x: T, a: U, b: U) -> U;
|
||||||
fn simd_select_bitmask<T, U>(x: T, a: U, b: U) -> U;
|
fn simd_select_bitmask<T, U>(x: T, a: U, b: U) -> U;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![feature(inline_const)]
|
#![feature(inline_const)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
pub(crate) fn simd_arith_offset<T, U>(ptrs: T, offsets: U) -> T;
|
pub(crate) fn simd_arith_offset<T, U>(ptrs: T, offsets: U) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
//@ revisions:rpass1 rpass2
|
//@ revisions:rpass1 rpass2
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
struct I32x2(i32, i32);
|
struct I32x2(i32, i32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_shuffle<T, I, U>(x: T, y: T, idx: I) -> U;
|
fn simd_shuffle<T, I, U>(x: T, y: T, idx: I) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
#![feature(repr_simd)]
|
#![feature(repr_simd)]
|
||||||
#![feature(platform_intrinsics)]
|
#![feature(intrinsics)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![stable(feature = "foo", since = "1.3.37")]
|
#![stable(feature = "foo", since = "1.3.37")]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
@ -11,7 +11,7 @@
|
|||||||
#[repr(simd)] struct i8x1_arr([i8; 1]);
|
#[repr(simd)] struct i8x1_arr([i8; 1]);
|
||||||
#[repr(simd)] struct f32x4([f32; 4]);
|
#[repr(simd)] struct f32x4([f32; 4]);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
#[rustc_const_stable(feature = "foo", since = "1.3.37")]
|
#[rustc_const_stable(feature = "foo", since = "1.3.37")]
|
||||||
fn simd_insert<T, U>(x: T, idx: u32, val: U) -> T;
|
fn simd_insert<T, U>(x: T, idx: u32, val: U) -> T;
|
||||||
#[rustc_const_stable(feature = "foo", since = "1.3.37")]
|
#[rustc_const_stable(feature = "foo", since = "1.3.37")]
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
//@ build-fail
|
//@ build-fail
|
||||||
|
|
||||||
#![feature(platform_intrinsics)]
|
#![feature(intrinsics)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_add<T>(a: T, b: T) -> T;
|
fn simd_add<T>(a: T, b: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
// gate-test-intrinsics
|
// gate-test-intrinsics
|
||||||
// gate-test-platform_intrinsics
|
|
||||||
//@ compile-flags: --crate-type=rlib
|
//@ compile-flags: --crate-type=rlib
|
||||||
|
|
||||||
#![feature(no_core, lang_items)]
|
#![feature(no_core, lang_items)]
|
||||||
@ -15,7 +14,7 @@ trait Tuple { }
|
|||||||
extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change
|
extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change
|
||||||
//~^ ERROR intrinsic must be in
|
//~^ ERROR intrinsic must be in
|
||||||
//~| ERROR unrecognized intrinsic function: `f1`
|
//~| ERROR unrecognized intrinsic function: `f1`
|
||||||
extern "platform-intrinsic" fn f2() {} //~ ERROR platform intrinsics are experimental
|
extern "rust-intrinsic" fn f2() {} //~ ERROR intrinsics are subject to change
|
||||||
//~^ ERROR intrinsic must be in
|
//~^ ERROR intrinsic must be in
|
||||||
//~| ERROR unrecognized intrinsic function: `f2`
|
//~| ERROR unrecognized intrinsic function: `f2`
|
||||||
extern "rust-call" fn f4(_: ()) {} //~ ERROR rust-call ABI is subject to change
|
extern "rust-call" fn f4(_: ()) {} //~ ERROR rust-call ABI is subject to change
|
||||||
@ -24,7 +23,7 @@ extern "rust-call" fn f4(_: ()) {} //~ ERROR rust-call ABI is subject to change
|
|||||||
trait Tr {
|
trait Tr {
|
||||||
extern "rust-intrinsic" fn m1(); //~ ERROR intrinsics are subject to change
|
extern "rust-intrinsic" fn m1(); //~ ERROR intrinsics are subject to change
|
||||||
//~^ ERROR intrinsic must be in
|
//~^ ERROR intrinsic must be in
|
||||||
extern "platform-intrinsic" fn m2(); //~ ERROR platform intrinsics are experimental
|
extern "rust-intrinsic" fn m2(); //~ ERROR intrinsics are subject to change
|
||||||
//~^ ERROR intrinsic must be in
|
//~^ ERROR intrinsic must be in
|
||||||
extern "rust-call" fn m4(_: ()); //~ ERROR rust-call ABI is subject to change
|
extern "rust-call" fn m4(_: ()); //~ ERROR rust-call ABI is subject to change
|
||||||
|
|
||||||
@ -37,7 +36,7 @@ extern "rust-call" fn dm4(_: ()) {} //~ ERROR rust-call ABI is subject to change
|
|||||||
impl Tr for S {
|
impl Tr for S {
|
||||||
extern "rust-intrinsic" fn m1() {} //~ ERROR intrinsics are subject to change
|
extern "rust-intrinsic" fn m1() {} //~ ERROR intrinsics are subject to change
|
||||||
//~^ ERROR intrinsic must be in
|
//~^ ERROR intrinsic must be in
|
||||||
extern "platform-intrinsic" fn m2() {} //~ ERROR platform intrinsics are experimental
|
extern "rust-intrinsic" fn m2() {} //~ ERROR intrinsics are subject to change
|
||||||
//~^ ERROR intrinsic must be in
|
//~^ ERROR intrinsic must be in
|
||||||
extern "rust-call" fn m4(_: ()) {} //~ ERROR rust-call ABI is subject to change
|
extern "rust-call" fn m4(_: ()) {} //~ ERROR rust-call ABI is subject to change
|
||||||
}
|
}
|
||||||
@ -46,17 +45,17 @@ extern "rust-call" fn m4(_: ()) {} //~ ERROR rust-call ABI is subject to change
|
|||||||
impl S {
|
impl S {
|
||||||
extern "rust-intrinsic" fn im1() {} //~ ERROR intrinsics are subject to change
|
extern "rust-intrinsic" fn im1() {} //~ ERROR intrinsics are subject to change
|
||||||
//~^ ERROR intrinsic must be in
|
//~^ ERROR intrinsic must be in
|
||||||
extern "platform-intrinsic" fn im2() {} //~ ERROR platform intrinsics are experimental
|
extern "rust-intrinsic" fn im2() {} //~ ERROR intrinsics are subject to change
|
||||||
//~^ ERROR intrinsic must be in
|
//~^ ERROR intrinsic must be in
|
||||||
extern "rust-call" fn im4(_: ()) {} //~ ERROR rust-call ABI is subject to change
|
extern "rust-call" fn im4(_: ()) {} //~ ERROR rust-call ABI is subject to change
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function pointer types
|
// Function pointer types
|
||||||
type A1 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change
|
type A1 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change
|
||||||
type A2 = extern "platform-intrinsic" fn(); //~ ERROR platform intrinsics are experimental
|
type A2 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change
|
||||||
type A4 = extern "rust-call" fn(_: ()); //~ ERROR rust-call ABI is subject to change
|
type A4 = extern "rust-call" fn(_: ()); //~ ERROR rust-call ABI is subject to change
|
||||||
|
|
||||||
// Foreign modules
|
// Foreign modules
|
||||||
extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change
|
extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change
|
||||||
extern "platform-intrinsic" {} //~ ERROR platform intrinsics are experimental
|
extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change
|
||||||
extern "rust-call" {} //~ ERROR rust-call ABI is subject to change
|
extern "rust-call" {} //~ ERROR rust-call ABI is subject to change
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
error[E0658]: intrinsics are subject to change
|
error[E0658]: intrinsics are subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:15:8
|
--> $DIR/feature-gate-abi.rs:14:8
|
||||||
|
|
|
|
||||||
LL | extern "rust-intrinsic" fn f1() {}
|
LL | extern "rust-intrinsic" fn f1() {}
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
@ -7,18 +7,17 @@ LL | extern "rust-intrinsic" fn f1() {}
|
|||||||
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: platform intrinsics are experimental and possibly buggy
|
error[E0658]: intrinsics are subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:18:8
|
--> $DIR/feature-gate-abi.rs:17:8
|
||||||
|
|
|
|
||||||
LL | extern "platform-intrinsic" fn f2() {}
|
LL | extern "rust-intrinsic" fn f2() {}
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #27731 <https://github.com/rust-lang/rust/issues/27731> for more information
|
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
||||||
= help: add `#![feature(platform_intrinsics)]` to the crate attributes to enable
|
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: rust-call ABI is subject to change
|
error[E0658]: rust-call ABI is subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:21:8
|
--> $DIR/feature-gate-abi.rs:20:8
|
||||||
|
|
|
|
||||||
LL | extern "rust-call" fn f4(_: ()) {}
|
LL | extern "rust-call" fn f4(_: ()) {}
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
@ -28,7 +27,7 @@ LL | extern "rust-call" fn f4(_: ()) {}
|
|||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: intrinsics are subject to change
|
error[E0658]: intrinsics are subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:25:12
|
--> $DIR/feature-gate-abi.rs:24:12
|
||||||
|
|
|
|
||||||
LL | extern "rust-intrinsic" fn m1();
|
LL | extern "rust-intrinsic" fn m1();
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
@ -36,18 +35,17 @@ LL | extern "rust-intrinsic" fn m1();
|
|||||||
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: platform intrinsics are experimental and possibly buggy
|
error[E0658]: intrinsics are subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:27:12
|
--> $DIR/feature-gate-abi.rs:26:12
|
||||||
|
|
|
|
||||||
LL | extern "platform-intrinsic" fn m2();
|
LL | extern "rust-intrinsic" fn m2();
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #27731 <https://github.com/rust-lang/rust/issues/27731> for more information
|
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
||||||
= help: add `#![feature(platform_intrinsics)]` to the crate attributes to enable
|
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: rust-call ABI is subject to change
|
error[E0658]: rust-call ABI is subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:29:12
|
--> $DIR/feature-gate-abi.rs:28:12
|
||||||
|
|
|
|
||||||
LL | extern "rust-call" fn m4(_: ());
|
LL | extern "rust-call" fn m4(_: ());
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
@ -57,7 +55,7 @@ LL | extern "rust-call" fn m4(_: ());
|
|||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: rust-call ABI is subject to change
|
error[E0658]: rust-call ABI is subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:31:12
|
--> $DIR/feature-gate-abi.rs:30:12
|
||||||
|
|
|
|
||||||
LL | extern "rust-call" fn dm4(_: ()) {}
|
LL | extern "rust-call" fn dm4(_: ()) {}
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
@ -67,7 +65,7 @@ LL | extern "rust-call" fn dm4(_: ()) {}
|
|||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: intrinsics are subject to change
|
error[E0658]: intrinsics are subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:38:12
|
--> $DIR/feature-gate-abi.rs:37:12
|
||||||
|
|
|
|
||||||
LL | extern "rust-intrinsic" fn m1() {}
|
LL | extern "rust-intrinsic" fn m1() {}
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
@ -75,18 +73,17 @@ LL | extern "rust-intrinsic" fn m1() {}
|
|||||||
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: platform intrinsics are experimental and possibly buggy
|
error[E0658]: intrinsics are subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:40:12
|
--> $DIR/feature-gate-abi.rs:39:12
|
||||||
|
|
|
|
||||||
LL | extern "platform-intrinsic" fn m2() {}
|
LL | extern "rust-intrinsic" fn m2() {}
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #27731 <https://github.com/rust-lang/rust/issues/27731> for more information
|
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
||||||
= help: add `#![feature(platform_intrinsics)]` to the crate attributes to enable
|
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: rust-call ABI is subject to change
|
error[E0658]: rust-call ABI is subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:42:12
|
--> $DIR/feature-gate-abi.rs:41:12
|
||||||
|
|
|
|
||||||
LL | extern "rust-call" fn m4(_: ()) {}
|
LL | extern "rust-call" fn m4(_: ()) {}
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
@ -96,7 +93,7 @@ LL | extern "rust-call" fn m4(_: ()) {}
|
|||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: intrinsics are subject to change
|
error[E0658]: intrinsics are subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:47:12
|
--> $DIR/feature-gate-abi.rs:46:12
|
||||||
|
|
|
|
||||||
LL | extern "rust-intrinsic" fn im1() {}
|
LL | extern "rust-intrinsic" fn im1() {}
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
@ -104,18 +101,17 @@ LL | extern "rust-intrinsic" fn im1() {}
|
|||||||
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: platform intrinsics are experimental and possibly buggy
|
error[E0658]: intrinsics are subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:49:12
|
--> $DIR/feature-gate-abi.rs:48:12
|
||||||
|
|
|
|
||||||
LL | extern "platform-intrinsic" fn im2() {}
|
LL | extern "rust-intrinsic" fn im2() {}
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #27731 <https://github.com/rust-lang/rust/issues/27731> for more information
|
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
||||||
= help: add `#![feature(platform_intrinsics)]` to the crate attributes to enable
|
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: rust-call ABI is subject to change
|
error[E0658]: rust-call ABI is subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:51:12
|
--> $DIR/feature-gate-abi.rs:50:12
|
||||||
|
|
|
|
||||||
LL | extern "rust-call" fn im4(_: ()) {}
|
LL | extern "rust-call" fn im4(_: ()) {}
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
@ -125,7 +121,7 @@ LL | extern "rust-call" fn im4(_: ()) {}
|
|||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: intrinsics are subject to change
|
error[E0658]: intrinsics are subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:55:18
|
--> $DIR/feature-gate-abi.rs:54:18
|
||||||
|
|
|
|
||||||
LL | type A1 = extern "rust-intrinsic" fn();
|
LL | type A1 = extern "rust-intrinsic" fn();
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
@ -133,18 +129,17 @@ LL | type A1 = extern "rust-intrinsic" fn();
|
|||||||
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: platform intrinsics are experimental and possibly buggy
|
error[E0658]: intrinsics are subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:56:18
|
--> $DIR/feature-gate-abi.rs:55:18
|
||||||
|
|
|
|
||||||
LL | type A2 = extern "platform-intrinsic" fn();
|
LL | type A2 = extern "rust-intrinsic" fn();
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #27731 <https://github.com/rust-lang/rust/issues/27731> for more information
|
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
||||||
= help: add `#![feature(platform_intrinsics)]` to the crate attributes to enable
|
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: rust-call ABI is subject to change
|
error[E0658]: rust-call ABI is subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:57:18
|
--> $DIR/feature-gate-abi.rs:56:18
|
||||||
|
|
|
|
||||||
LL | type A4 = extern "rust-call" fn(_: ());
|
LL | type A4 = extern "rust-call" fn(_: ());
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
@ -153,6 +148,15 @@ LL | type A4 = extern "rust-call" fn(_: ());
|
|||||||
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
|
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
|
error[E0658]: intrinsics are subject to change
|
||||||
|
--> $DIR/feature-gate-abi.rs:59:8
|
||||||
|
|
|
||||||
|
LL | extern "rust-intrinsic" {}
|
||||||
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
||||||
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: intrinsics are subject to change
|
error[E0658]: intrinsics are subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:60:8
|
--> $DIR/feature-gate-abi.rs:60:8
|
||||||
|
|
|
|
||||||
@ -162,18 +166,8 @@ LL | extern "rust-intrinsic" {}
|
|||||||
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: platform intrinsics are experimental and possibly buggy
|
|
||||||
--> $DIR/feature-gate-abi.rs:61:8
|
|
||||||
|
|
|
||||||
LL | extern "platform-intrinsic" {}
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: see issue #27731 <https://github.com/rust-lang/rust/issues/27731> for more information
|
|
||||||
= help: add `#![feature(platform_intrinsics)]` to the crate attributes to enable
|
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
||||||
|
|
||||||
error[E0658]: rust-call ABI is subject to change
|
error[E0658]: rust-call ABI is subject to change
|
||||||
--> $DIR/feature-gate-abi.rs:62:8
|
--> $DIR/feature-gate-abi.rs:61:8
|
||||||
|
|
|
|
||||||
LL | extern "rust-call" {}
|
LL | extern "rust-call" {}
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
@ -183,7 +177,7 @@ LL | extern "rust-call" {}
|
|||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0093]: unrecognized intrinsic function: `f1`
|
error[E0093]: unrecognized intrinsic function: `f1`
|
||||||
--> $DIR/feature-gate-abi.rs:15:28
|
--> $DIR/feature-gate-abi.rs:14:28
|
||||||
|
|
|
|
||||||
LL | extern "rust-intrinsic" fn f1() {}
|
LL | extern "rust-intrinsic" fn f1() {}
|
||||||
| ^^ unrecognized intrinsic
|
| ^^ unrecognized intrinsic
|
||||||
@ -191,60 +185,60 @@ LL | extern "rust-intrinsic" fn f1() {}
|
|||||||
= help: if you're adding an intrinsic, be sure to update `check_intrinsic_type`
|
= help: if you're adding an intrinsic, be sure to update `check_intrinsic_type`
|
||||||
|
|
||||||
error[E0093]: unrecognized intrinsic function: `f2`
|
error[E0093]: unrecognized intrinsic function: `f2`
|
||||||
--> $DIR/feature-gate-abi.rs:18:32
|
--> $DIR/feature-gate-abi.rs:17:28
|
||||||
|
|
|
|
||||||
LL | extern "platform-intrinsic" fn f2() {}
|
LL | extern "rust-intrinsic" fn f2() {}
|
||||||
| ^^ unrecognized intrinsic
|
| ^^ unrecognized intrinsic
|
||||||
|
|
|
|
||||||
= help: if you're adding an intrinsic, be sure to update `check_intrinsic_type`
|
= help: if you're adding an intrinsic, be sure to update `check_intrinsic_type`
|
||||||
|
|
||||||
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
||||||
--> $DIR/feature-gate-abi.rs:25:32
|
--> $DIR/feature-gate-abi.rs:24:32
|
||||||
|
|
|
|
||||||
LL | extern "rust-intrinsic" fn m1();
|
LL | extern "rust-intrinsic" fn m1();
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
||||||
--> $DIR/feature-gate-abi.rs:27:36
|
--> $DIR/feature-gate-abi.rs:26:32
|
||||||
|
|
|
|
||||||
LL | extern "platform-intrinsic" fn m2();
|
LL | extern "rust-intrinsic" fn m2();
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
||||||
--> $DIR/feature-gate-abi.rs:15:33
|
--> $DIR/feature-gate-abi.rs:14:33
|
||||||
|
|
|
|
||||||
LL | extern "rust-intrinsic" fn f1() {}
|
LL | extern "rust-intrinsic" fn f1() {}
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
||||||
--> $DIR/feature-gate-abi.rs:18:37
|
--> $DIR/feature-gate-abi.rs:17:33
|
||||||
|
|
|
|
||||||
LL | extern "platform-intrinsic" fn f2() {}
|
LL | extern "rust-intrinsic" fn f2() {}
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
||||||
--> $DIR/feature-gate-abi.rs:38:37
|
--> $DIR/feature-gate-abi.rs:37:37
|
||||||
|
|
|
|
||||||
LL | extern "rust-intrinsic" fn m1() {}
|
LL | extern "rust-intrinsic" fn m1() {}
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
||||||
--> $DIR/feature-gate-abi.rs:40:41
|
--> $DIR/feature-gate-abi.rs:39:37
|
||||||
|
|
|
|
||||||
LL | extern "platform-intrinsic" fn m2() {}
|
LL | extern "rust-intrinsic" fn m2() {}
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
||||||
--> $DIR/feature-gate-abi.rs:47:38
|
--> $DIR/feature-gate-abi.rs:46:38
|
||||||
|
|
|
|
||||||
LL | extern "rust-intrinsic" fn im1() {}
|
LL | extern "rust-intrinsic" fn im1() {}
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
|
||||||
--> $DIR/feature-gate-abi.rs:49:42
|
--> $DIR/feature-gate-abi.rs:48:38
|
||||||
|
|
|
|
||||||
LL | extern "platform-intrinsic" fn im2() {}
|
LL | extern "rust-intrinsic" fn im2() {}
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error: aborting due to 29 previous errors
|
error: aborting due to 29 previous errors
|
||||||
|
|
||||||
|
@ -6,5 +6,5 @@
|
|||||||
fn main() {
|
fn main() {
|
||||||
const { core::mem::transmute::<u8, u8> };
|
const { core::mem::transmute::<u8, u8> };
|
||||||
// Don't resolve the instance of this inline constant to be an intrinsic,
|
// Don't resolve the instance of this inline constant to be an intrinsic,
|
||||||
// even if the type of the constant is `extern "intrinsic" fn(u8) -> u8`.
|
// even if the type of the constant is `extern "rust-intrinsic" fn(u8) -> u8`.
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
//@ build-fail
|
//@ build-fail
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics, core_intrinsics)]
|
#![feature(repr_simd, intrinsics, core_intrinsics)]
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
// Bad monomorphizations could previously cause LLVM asserts even though the
|
// Bad monomorphizations could previously cause LLVM asserts even though the
|
||||||
// error was caught in the compiler.
|
// error was caught in the compiler.
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_add<T>(x: T, y: T) -> T;
|
fn simd_add<T>(x: T, y: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
//@ pretty-expanded FIXME #23616
|
//@ pretty-expanded FIXME #23616
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics, generic_const_exprs)]
|
#![feature(repr_simd, intrinsics, generic_const_exprs)]
|
||||||
#![allow(non_camel_case_types, incomplete_features)]
|
#![allow(non_camel_case_types, incomplete_features)]
|
||||||
|
|
||||||
pub trait Simd {
|
pub trait Simd {
|
||||||
@ -25,7 +25,7 @@ impl Simd for i32x4 {
|
|||||||
//~| ERROR SIMD vector element type should be a primitive scalar
|
//~| ERROR SIMD vector element type should be a primitive scalar
|
||||||
//~| ERROR unconstrained generic constant
|
//~| ERROR unconstrained generic constant
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;
|
fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;
|
||||||
fn simd_extract<T, E>(x: T, idx: u32) -> E;
|
fn simd_extract<T, E>(x: T, idx: u32) -> E;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
//@ pretty-expanded FIXME #23616
|
//@ pretty-expanded FIXME #23616
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
@ -13,7 +13,7 @@
|
|||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
struct T<const N: usize>([i32; N]);
|
struct T<const N: usize>([i32; N]);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;
|
fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;
|
||||||
fn simd_extract<T, E>(x: T, idx: u32) -> E;
|
fn simd_extract<T, E>(x: T, idx: u32) -> E;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
use std::ops;
|
use std::ops;
|
||||||
|
|
||||||
@ -21,7 +21,7 @@
|
|||||||
struct C<T, const N: usize>([T; N]);
|
struct C<T, const N: usize>([T; N]);
|
||||||
|
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_add<T>(x: T, y: T) -> T;
|
fn simd_add<T>(x: T, y: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,14 +8,14 @@
|
|||||||
|
|
||||||
// Test that the simd floating-point math intrinsics produce correct results.
|
// Test that the simd floating-point math intrinsics produce correct results.
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_fsqrt<T>(x: T) -> T;
|
fn simd_fsqrt<T>(x: T) -> T;
|
||||||
fn simd_fabs<T>(x: T) -> T;
|
fn simd_fabs<T>(x: T) -> T;
|
||||||
fn simd_fsin<T>(x: T) -> T;
|
fn simd_fsin<T>(x: T) -> T;
|
||||||
|
@ -3,17 +3,14 @@
|
|||||||
|
|
||||||
// Test that the simd_f{min,max} intrinsics produce the correct results.
|
// Test that the simd_f{min,max} intrinsics produce the correct results.
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, core_intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
use std::intrinsics::simd::*;
|
||||||
fn simd_fmin<T>(x: T, y: T) -> T;
|
|
||||||
fn simd_fmax<T>(x: T, y: T) -> T;
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let x = f32x4(1.0, 2.0, 3.0, 4.0);
|
let x = f32x4(1.0, 2.0, 3.0, 4.0);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//@ build-fail
|
//@ build-fail
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
@ -14,7 +14,7 @@
|
|||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_add<T>(x: T, y: T) -> T;
|
fn simd_add<T>(x: T, y: T) -> T;
|
||||||
fn simd_sub<T>(x: T, y: T) -> T;
|
fn simd_sub<T>(x: T, y: T) -> T;
|
||||||
fn simd_mul<T>(x: T, y: T) -> T;
|
fn simd_mul<T>(x: T, y: T) -> T;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert
|
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
@ -31,7 +31,7 @@ macro_rules! all_eq_ {
|
|||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_add<T>(x: T, y: T) -> T;
|
fn simd_add<T>(x: T, y: T) -> T;
|
||||||
fn simd_sub<T>(x: T, y: T) -> T;
|
fn simd_sub<T>(x: T, y: T) -> T;
|
||||||
fn simd_mul<T>(x: T, y: T) -> T;
|
fn simd_mul<T>(x: T, y: T) -> T;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//@ build-fail
|
//@ build-fail
|
||||||
//@ ignore-emscripten
|
//@ ignore-emscripten
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
@ -14,7 +14,7 @@
|
|||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_saturating_add<T>(x: T, y: T) -> T;
|
fn simd_saturating_add<T>(x: T, y: T) -> T;
|
||||||
fn simd_saturating_sub<T>(x: T, y: T) -> T;
|
fn simd_saturating_sub<T>(x: T, y: T) -> T;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//@ ignore-emscripten
|
//@ ignore-emscripten
|
||||||
|
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
@ -12,7 +12,7 @@
|
|||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
struct I32<const N: usize>([i32; N]);
|
struct I32<const N: usize>([i32; N]);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_saturating_add<T>(x: T, y: T) -> T;
|
fn simd_saturating_add<T>(x: T, y: T) -> T;
|
||||||
fn simd_saturating_sub<T>(x: T, y: T) -> T;
|
fn simd_saturating_sub<T>(x: T, y: T) -> T;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_as<T, U>(x: T) -> U;
|
fn simd_as<T, U>(x: T) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
// Test that the simd_bitmask intrinsic produces correct results.
|
// Test that the simd_bitmask intrinsic produces correct results.
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -21,7 +21,7 @@
|
|||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
struct Tx4<T>(pub T, pub T, pub T, pub T);
|
struct Tx4<T>(pub T, pub T, pub T, pub T);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_bitmask<T, U>(x: T) -> U;
|
fn simd_bitmask<T, U>(x: T) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// Test that the simd_bitmask intrinsic produces ok-ish error
|
// Test that the simd_bitmask intrinsic produces ok-ish error
|
||||||
// messages when misused.
|
// messages when misused.
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -30,7 +30,7 @@
|
|||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
struct u8x64([u8; 64]);
|
struct u8x64([u8; 64]);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_bitmask<T, U>(x: T) -> U;
|
fn simd_bitmask<T, U>(x: T) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -10,7 +10,7 @@
|
|||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
struct u8x4([u8; 4]);
|
struct u8x4([u8; 4]);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_bswap<T>(x: T) -> T;
|
fn simd_bswap<T>(x: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert
|
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_cast<T, U>(x: T) -> U;
|
fn simd_cast<T, U>(x: T) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_cast<T, U>(x: T) -> U;
|
fn simd_cast<T, U>(x: T) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//@ build-fail
|
//@ build-fail
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
@ -23,7 +23,7 @@ struct f32x8(f32, f32, f32, f32,
|
|||||||
f32, f32, f32, f32);
|
f32, f32, f32, f32);
|
||||||
|
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_cast<T, U>(x: T) -> U;
|
fn simd_cast<T, U>(x: T) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert
|
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics, concat_idents)]
|
#![feature(repr_simd, intrinsics, concat_idents)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -14,7 +14,7 @@
|
|||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_eq<T, U>(x: T, y: T) -> U;
|
fn simd_eq<T, U>(x: T, y: T) -> U;
|
||||||
fn simd_ne<T, U>(x: T, y: T) -> U;
|
fn simd_ne<T, U>(x: T, y: T) -> U;
|
||||||
fn simd_lt<T, U>(x: T, y: T) -> U;
|
fn simd_lt<T, U>(x: T, y: T) -> U;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//@ build-fail
|
//@ build-fail
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
@ -12,7 +12,7 @@
|
|||||||
struct i16x8(i16, i16, i16, i16,
|
struct i16x8(i16, i16, i16, i16,
|
||||||
i16, i16, i16, i16);
|
i16, i16, i16, i16);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_eq<T, U>(x: T, y: T) -> U;
|
fn simd_eq<T, U>(x: T, y: T) -> U;
|
||||||
fn simd_ne<T, U>(x: T, y: T) -> U;
|
fn simd_ne<T, U>(x: T, y: T) -> U;
|
||||||
fn simd_lt<T, U>(x: T, y: T) -> U;
|
fn simd_lt<T, U>(x: T, y: T) -> U;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert
|
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![feature(inline_const)]
|
#![feature(inline_const)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -18,7 +18,7 @@
|
|||||||
struct i32x8(i32, i32, i32, i32,
|
struct i32x8(i32, i32, i32, i32,
|
||||||
i32, i32, i32, i32);
|
i32, i32, i32, i32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;
|
fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;
|
||||||
fn simd_extract<T, E>(x: T, idx: u32) -> E;
|
fn simd_extract<T, E>(x: T, idx: u32) -> E;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//@ build-fail
|
//@ build-fail
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics, rustc_attrs, adt_const_params)]
|
#![feature(repr_simd, intrinsics, rustc_attrs, adt_const_params)]
|
||||||
#![allow(incomplete_features)]
|
#![allow(incomplete_features)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -31,7 +31,7 @@ struct i32x8(i32, i32, i32, i32,
|
|||||||
struct f32x8(f32, f32, f32, f32,
|
struct f32x8(f32, f32, f32, f32,
|
||||||
f32, f32, f32, f32);
|
f32, f32, f32, f32);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;
|
fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;
|
||||||
fn simd_extract<T, E>(x: T, idx: u32) -> E;
|
fn simd_extract<T, E>(x: T, idx: u32) -> E;
|
||||||
|
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
|
|
||||||
// Test that the simd_{gather,scatter} intrinsics produce the correct results.
|
// Test that the simd_{gather,scatter} intrinsics produce the correct results.
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
struct x4<T>(pub T, pub T, pub T, pub T);
|
struct x4<T>(pub T, pub T, pub T, pub T);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_gather<T, U, V>(x: T, y: U, z: V) -> T;
|
fn simd_gather<T, U, V>(x: T, y: U, z: V) -> T;
|
||||||
fn simd_scatter<T, U, V>(x: T, y: U, z: V) -> ();
|
fn simd_scatter<T, U, V>(x: T, y: U, z: V) -> ();
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// Test that the simd_reduce_{op} intrinsics produce the correct results.
|
// Test that the simd_reduce_{op} intrinsics produce the correct results.
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -24,7 +24,7 @@
|
|||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
struct b8x4(pub i8, pub i8, pub i8, pub i8);
|
struct b8x4(pub i8, pub i8, pub i8, pub i8);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_reduce_add_unordered<T, U>(x: T) -> U;
|
fn simd_reduce_add_unordered<T, U>(x: T) -> U;
|
||||||
fn simd_reduce_mul_unordered<T, U>(x: T) -> U;
|
fn simd_reduce_mul_unordered<T, U>(x: T) -> U;
|
||||||
fn simd_reduce_add_ordered<T, U>(x: T, acc: U) -> U;
|
fn simd_reduce_add_ordered<T, U>(x: T, acc: U) -> U;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// Test that the simd_reduce_{op} intrinsics produce ok-ish error
|
// Test that the simd_reduce_{op} intrinsics produce ok-ish error
|
||||||
// messages when misused.
|
// messages when misused.
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -16,7 +16,7 @@
|
|||||||
pub struct u32x4(pub u32, pub u32, pub u32, pub u32);
|
pub struct u32x4(pub u32, pub u32, pub u32, pub u32);
|
||||||
|
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_reduce_add_ordered<T, U>(x: T, y: U) -> U;
|
fn simd_reduce_add_ordered<T, U>(x: T, y: U) -> U;
|
||||||
fn simd_reduce_mul_ordered<T, U>(x: T, y: U) -> U;
|
fn simd_reduce_mul_ordered<T, U>(x: T, y: U) -> U;
|
||||||
fn simd_reduce_and<T, U>(x: T) -> U;
|
fn simd_reduce_and<T, U>(x: T) -> U;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
// Test that the simd_select intrinsics produces correct results.
|
// Test that the simd_select intrinsics produces correct results.
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -29,7 +29,7 @@
|
|||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
struct b8x4(pub i8, pub i8, pub i8, pub i8);
|
struct b8x4(pub i8, pub i8, pub i8, pub i8);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_select<T, U>(x: T, a: U, b: U) -> U;
|
fn simd_select<T, U>(x: T, a: U, b: U) -> U;
|
||||||
fn simd_select_bitmask<T, U>(x: T, a: U, b: U) -> U;
|
fn simd_select_bitmask<T, U>(x: T, a: U, b: U) -> U;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// Test that the simd_select intrinsic produces ok-ish error
|
// Test that the simd_select intrinsic produces ok-ish error
|
||||||
// messages when misused.
|
// messages when misused.
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -22,7 +22,7 @@
|
|||||||
#[derive(Copy, Clone, PartialEq)]
|
#[derive(Copy, Clone, PartialEq)]
|
||||||
struct b8x8(pub i8, pub i8, pub i8, pub i8, pub i8, pub i8, pub i8, pub i8);
|
struct b8x8(pub i8, pub i8, pub i8, pub i8, pub i8, pub i8, pub i8, pub i8);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_select<T, U>(x: T, a: U, b: U) -> U;
|
fn simd_select<T, U>(x: T, a: U, b: U) -> U;
|
||||||
fn simd_select_bitmask<T, U>(x: T, a: U, b: U) -> U;
|
fn simd_select_bitmask<T, U>(x: T, a: U, b: U) -> U;
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
// Test that the simd_shuffle intrinsic produces ok-ish error
|
// Test that the simd_shuffle intrinsic produces ok-ish error
|
||||||
// messages when misused.
|
// messages when misused.
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub struct Simd<T, const N: usize>([T; N]);
|
pub struct Simd<T, const N: usize>([T; N]);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_shuffle<T, I, U>(a: T, b: T, i: I) -> U;
|
fn simd_shuffle<T, I, U>(a: T, b: T, i: I) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
//
|
//
|
||||||
//@ run-pass
|
//@ run-pass
|
||||||
//@ compile-flags: -Zmir-opt-level=4
|
//@ compile-flags: -Zmir-opt-level=4
|
||||||
#![feature(platform_intrinsics, repr_simd)]
|
#![feature(intrinsics, repr_simd)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_shuffle<T, I, U>(x: T, y: T, idx: I) -> U;
|
fn simd_shuffle<T, I, U>(x: T, y: T, idx: I) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
//
|
//
|
||||||
//@ run-pass
|
//@ run-pass
|
||||||
//@ compile-flags: -Zmir-opt-level=4
|
//@ compile-flags: -Zmir-opt-level=4
|
||||||
#![feature(platform_intrinsics, repr_simd)]
|
#![feature(intrinsics, repr_simd)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_shuffle<T, I, U>(x: T, y: T, idx: I) -> U;
|
fn simd_shuffle<T, I, U>(x: T, y: T, idx: I) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
// with the wrong number of generic lifetime/type/const parameters, and
|
// with the wrong number of generic lifetime/type/const parameters, and
|
||||||
// that no ICE occurs in these cases.
|
// that no ICE occurs in these cases.
|
||||||
|
|
||||||
#![feature(platform_intrinsics)]
|
#![feature(intrinsics)]
|
||||||
#![crate_type="lib"]
|
#![crate_type="lib"]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_saturating_add<'a, T: 'a>(x: T, y: T);
|
fn simd_saturating_add<'a, T: 'a>(x: T, y: T);
|
||||||
//~^ ERROR: intrinsic has wrong number of lifetime parameters
|
//~^ ERROR: intrinsic has wrong number of lifetime parameters
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_cast_ptr<T, U>(x: T) -> U;
|
fn simd_cast_ptr<T, U>(x: T) -> U;
|
||||||
fn simd_expose_addr<T, U>(x: T) -> U;
|
fn simd_expose_addr<T, U>(x: T) -> U;
|
||||||
fn simd_from_exposed_addr<T, U>(x: T) -> U;
|
fn simd_from_exposed_addr<T, U>(x: T) -> U;
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
//@ compile-flags: -O -Zverify-llvm-ir
|
//@ compile-flags: -O -Zverify-llvm-ir
|
||||||
|
|
||||||
#![feature(repr_simd)]
|
#![feature(repr_simd)]
|
||||||
#![feature(platform_intrinsics)]
|
#![feature(intrinsics)]
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
struct i32x4([i32; 4]);
|
struct i32x4([i32; 4]);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
pub(crate) fn simd_add<T>(x: T, y: T) -> T;
|
pub(crate) fn simd_add<T>(x: T, y: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
//@ ignore-emscripten FIXME(#45351)
|
//@ ignore-emscripten FIXME(#45351)
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
@ -11,7 +11,7 @@
|
|||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
pub struct Short3(pub i16, pub i16, pub i16);
|
pub struct Short3(pub i16, pub i16, pub i16);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_cast<T, U>(x: T) -> U;
|
fn simd_cast<T, U>(x: T) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
// Short form of the generic gather/scatter tests,
|
// Short form of the generic gather/scatter tests,
|
||||||
// verifying simd([*const T; N]) and simd([*mut T; N]) pass typeck and work.
|
// verifying simd([*const T; N]) and simd([*mut T; N]) pass typeck and work.
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
@ -22,7 +22,7 @@
|
|||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
struct i32x4([i32; 4]);
|
struct i32x4([i32; 4]);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_gather<T, U, V>(x: T, y: U, z: V) -> T;
|
fn simd_gather<T, U, V>(x: T, y: U, z: V) -> T;
|
||||||
fn simd_scatter<T, U, V>(x: T, y: U, z: V) -> ();
|
fn simd_scatter<T, U, V>(x: T, y: U, z: V) -> ();
|
||||||
}
|
}
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
// Test that simd gather instructions on slice of usize don't cause crash
|
// Test that simd gather instructions on slice of usize don't cause crash
|
||||||
// See issue #89183 - https://github.com/rust-lang/rust/issues/89193
|
// See issue #89183 - https://github.com/rust-lang/rust/issues/89193
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||||
struct x4<T>(pub T, pub T, pub T, pub T);
|
struct x4<T>(pub T, pub T, pub T, pub T);
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_gather<T, U, V>(x: T, y: U, z: V) -> T;
|
fn simd_gather<T, U, V>(x: T, y: U, z: V) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//@ build-fail
|
//@ build-fail
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
|
fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
|
||||||
fn simd_masked_store<M, P, T>(mask: M, pointer: P, values: T) -> ();
|
fn simd_masked_store<M, P, T>(mask: M, pointer: P, values: T) -> ();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//@ check-fail
|
//@ check-fail
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
|
fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
|
||||||
fn simd_masked_store<M, P, T>(mask: M, pointer: P, values: T) -> ();
|
fn simd_masked_store<M, P, T>(mask: M, pointer: P, values: T) -> ();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
|
fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
|
||||||
fn simd_masked_store<M, P, T>(mask: M, pointer: P, values: T) -> ();
|
fn simd_masked_store<M, P, T>(mask: M, pointer: P, values: T) -> ();
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
//@[old]run-pass
|
//@[old]run-pass
|
||||||
//@[generic_with_fn]run-pass
|
//@[generic_with_fn]run-pass
|
||||||
//@ revisions: old generic generic_with_fn
|
//@ revisions: old generic generic_with_fn
|
||||||
#![feature(repr_simd, platform_intrinsics, adt_const_params, generic_const_exprs)]
|
#![feature(repr_simd, intrinsics, adt_const_params, generic_const_exprs)]
|
||||||
#![allow(incomplete_features)]
|
#![allow(incomplete_features)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
#[cfg(old)]
|
#[cfg(old)]
|
||||||
fn simd_shuffle<T, I, U>(a: T, b: T, i: I) -> U;
|
fn simd_shuffle<T, I, U>(a: T, b: T, i: I) -> U;
|
||||||
#[cfg(any(generic, generic_with_fn))]
|
#[cfg(any(generic, generic_with_fn))]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#[repr(simd, packed)]
|
#[repr(simd, packed)]
|
||||||
@ -25,7 +25,7 @@ fn check_ty<T>() {
|
|||||||
check_size_align::<T, 15>();
|
check_size_align::<T, 15>();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_add<T>(a: T, b: T) -> T;
|
fn simd_add<T>(a: T, b: T) -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
//@ revisions: opt noopt
|
//@ revisions: opt noopt
|
||||||
//@[noopt] compile-flags: -Copt-level=0
|
//@[noopt] compile-flags: -Copt-level=0
|
||||||
//@[opt] compile-flags: -O
|
//@[opt] compile-flags: -O
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
#![allow(incomplete_features)]
|
#![allow(incomplete_features)]
|
||||||
#![feature(adt_const_params)]
|
#![feature(adt_const_params)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_shuffle<T, I, U>(a: T, b: T, i: I) -> U;
|
fn simd_shuffle<T, I, U>(a: T, b: T, i: I) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
//@run-pass
|
//@run-pass
|
||||||
//@ignore-endian-big behavior of simd_select_bitmask is endian-specific
|
//@ignore-endian-big behavior of simd_select_bitmask is endian-specific
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
extern "platform-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
fn simd_bitmask<T, U>(v: T) -> U;
|
fn simd_bitmask<T, U>(v: T) -> U;
|
||||||
fn simd_select_bitmask<T, U>(m: T, a: U, b: U) -> U;
|
fn simd_select_bitmask<T, U>(m: T, a: U, b: U) -> U;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//@ build-fail
|
//@ build-fail
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
//@ error-pattern:monomorphising SIMD type `Simd<0>` of zero length
|
//@ error-pattern:monomorphising SIMD type `Simd<0>` of zero length
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//@ build-fail
|
//@ build-fail
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
//@ error-pattern:monomorphising SIMD type `Simd<65536>` of length greater than 32768
|
//@ error-pattern:monomorphising SIMD type `Simd<65536>` of length greater than 32768
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//@ run-pass
|
//@ run-pass
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
struct Simd<const N: usize>([f32; N]);
|
struct Simd<const N: usize>([f32; N]);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//@ build-fail
|
//@ build-fail
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, intrinsics)]
|
||||||
|
|
||||||
|
|
||||||
//@ error-pattern:monomorphising SIMD type `Simd2<X>` with a non-primitive-scalar (integer/float/pointer) element type `X`
|
//@ error-pattern:monomorphising SIMD type `Simd2<X>` with a non-primitive-scalar (integer/float/pointer) element type `X`
|
||||||
|
Loading…
Reference in New Issue
Block a user