Skip to content

Commit

Permalink
args may be passed by value
Browse files Browse the repository at this point in the history
  • Loading branch information
KodrAus committed Nov 29, 2020
1 parent 90255c8 commit 354c7d0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,27 @@ extern "platform-intrinsic" {
// CHECK-LABEL: @extract_m
#[no_mangle]
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)
}

// CHECK-LABEL: @extract_s
#[no_mangle]
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)
}

// CHECK-LABEL: @insert_m
#[no_mangle]
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)
}

// CHECK-LABEL: @insert_s
#[no_mangle]
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)
}

0 comments on commit 354c7d0

Please sign in to comment.