Switch test back to run-pass.
This commit is contained in:
parent
2942121736
commit
7b1eedaae8
@ -1,6 +1,5 @@
|
|||||||
// build-pass
|
// run-pass
|
||||||
|
// compile-flags: -O -Zverify-llvm-ir
|
||||||
#![crate_type = "lib"]
|
|
||||||
|
|
||||||
#![feature(repr_simd)]
|
#![feature(repr_simd)]
|
||||||
#![feature(platform_intrinsics)]
|
#![feature(platform_intrinsics)]
|
||||||
@ -8,9 +7,19 @@
|
|||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
pub struct i32x4([i32; 4]);
|
struct i32x4([i32; 4]);
|
||||||
|
|
||||||
pub fn f(a: i32x4) -> [i32; 4] {
|
extern "platform-intrinsic" {
|
||||||
let b = a;
|
pub(crate) fn simd_add<T>(x: T, y: T) -> T;
|
||||||
b.0
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
|
fn to_array(a: i32x4) -> [i32; 4] {
|
||||||
|
a.0
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let a = i32x4([1, 2, 3, 4]);
|
||||||
|
let b = unsafe { simd_add(a, a) };
|
||||||
|
assert_eq!(to_array(b), [2, 4, 6, 8]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user