Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
|
@ -0,0 +1,43 @@
|
|||
//
|
||||
// compile-flags: -C no-prepopulate-passes
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
#![feature(repr_simd, platform_intrinsics, min_const_generics)]
|
||||
|
||||
#[repr(simd)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct S<const N: usize>([f32; N]);
|
||||
|
||||
#[repr(simd)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct T([f32; 4]);
|
||||
|
||||
#[repr(simd)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct U(f32, f32, f32, f32);
|
||||
|
||||
// CHECK-LABEL: @build_array_s
|
||||
#[no_mangle]
|
||||
pub fn build_array_s(x: [f32; 4]) -> S<4> {
|
||||
// CHECK: call void @llvm.memcpy.{{.+}}({{.*}}, i{{[0-9]+}} 16, i1 false)
|
||||
// CHECK: call void @llvm.memcpy.{{.+}}({{.*}}, i{{[0-9]+}} 16, i1 false)
|
||||
S::<4>(x)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @build_array_t
|
||||
#[no_mangle]
|
||||
pub fn build_array_t(x: [f32; 4]) -> T {
|
||||
// CHECK: call void @llvm.memcpy.{{.+}}({{.*}}, i{{[0-9]+}} 16, i1 false)
|
||||
// CHECK: call void @llvm.memcpy.{{.+}}({{.*}}, i{{[0-9]+}} 16, i1 false)
|
||||
T(x)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @build_array_u
|
||||
#[no_mangle]
|
||||
pub fn build_array_u(x: [f32; 4]) -> U {
|
||||
// CHECK: call void @llvm.memcpy.{{.+}}({{.*}}, i{{[0-9]+}} 16, i1 false)
|
||||
// CHECK: call void @llvm.memcpy.{{.+}}({{.*}}, i{{[0-9]+}} 16, i1 false)
|
||||
unsafe { std::mem::transmute(x) }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue