args may be passed by value

This commit is contained in:
Ashley Mannix 2020-11-29 18:36:30 +10:00
parent 90255c8da6
commit 354c7d0ab8

View file

@ -21,27 +21,27 @@ extern "platform-intrinsic" {
// CHECK-LABEL: @extract_m // CHECK-LABEL: @extract_m
#[no_mangle] #[no_mangle]
pub unsafe fn extract_m(v: M, i: u32) -> f32 { pub unsafe fn extract_m(v: M, i: u32) -> f32 {
// CHECK: extractelement <4 x float> %_3, i32 %i // CHECK: extractelement <4 x float> %{{v|_3}}, i32 %i
simd_extract(v, i) simd_extract(v, i)
} }
// CHECK-LABEL: @extract_s // CHECK-LABEL: @extract_s
#[no_mangle] #[no_mangle]
pub unsafe fn extract_s(v: S<4>, i: u32) -> f32 { pub unsafe fn extract_s(v: S<4>, i: u32) -> f32 {
// CHECK: extractelement <4 x float> %_3, i32 %i // CHECK: extractelement <4 x float> %{{v|_3}}, i32 %i
simd_extract(v, i) simd_extract(v, i)
} }
// CHECK-LABEL: @insert_m // CHECK-LABEL: @insert_m
#[no_mangle] #[no_mangle]
pub unsafe fn insert_m(v: M, i: u32, j: f32) -> M { pub unsafe fn insert_m(v: M, i: u32, j: f32) -> M {
// CHECK: insertelement <4 x float> %_4, float %j, i32 %i // CHECK: insertelement <4 x float> %{{v|_4}}, float %j, i32 %i
simd_insert(v, i, j) simd_insert(v, i, j)
} }
// CHECK-LABEL: @insert_s // CHECK-LABEL: @insert_s
#[no_mangle] #[no_mangle]
pub unsafe fn insert_s(v: S<4>, i: u32, j: f32) -> S<4> { pub unsafe fn insert_s(v: S<4>, i: u32, j: f32) -> S<4> {
// CHECK: insertelement <4 x float> %_4, float %j, i32 %i // CHECK: insertelement <4 x float> %{{v|_4}}, float %j, i32 %i
simd_insert(v, i, j) simd_insert(v, i, j)
} }