Fix alignment passed down to LLVM for simd_masked_load
This commit is contained in:
parent
5b8bc568d2
commit
95b5a80f47
3 changed files with 3 additions and 3 deletions
|
@ -1568,7 +1568,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
|
||||||
|
|
||||||
// Alignment of T, must be a constant integer value:
|
// Alignment of T, must be a constant integer value:
|
||||||
let alignment_ty = bx.type_i32();
|
let alignment_ty = bx.type_i32();
|
||||||
let alignment = bx.const_i32(bx.align_of(values_ty).bytes() as i32);
|
let alignment = bx.const_i32(bx.align_of(values_elem).bytes() as i32);
|
||||||
|
|
||||||
// Truncate the mask vector to a vector of i1s:
|
// Truncate the mask vector to a vector of i1s:
|
||||||
let (mask, mask_ty) = {
|
let (mask, mask_ty) = {
|
||||||
|
|
|
@ -21,7 +21,7 @@ extern "platform-intrinsic" {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe fn load_f32x2(mask: Vec2<i32>, pointer: *const f32,
|
pub unsafe fn load_f32x2(mask: Vec2<i32>, pointer: *const f32,
|
||||||
values: Vec2<f32>) -> Vec2<f32> {
|
values: Vec2<f32>) -> Vec2<f32> {
|
||||||
// CHECK: call <2 x float> @llvm.masked.load.v2f32.p0(ptr {{.*}}, i32 {{.*}}, <2 x i1> {{.*}}, <2 x float> {{.*}})
|
// CHECK: call <2 x float> @llvm.masked.load.v2f32.p0(ptr {{.*}}, i32 4, <2 x i1> {{.*}}, <2 x float> {{.*}})
|
||||||
simd_masked_load(mask, pointer, values)
|
simd_masked_load(mask, pointer, values)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ extern "platform-intrinsic" {
|
||||||
// CHECK-LABEL: @store_f32x2
|
// CHECK-LABEL: @store_f32x2
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe fn store_f32x2(mask: Vec2<i32>, pointer: *mut f32, values: Vec2<f32>) {
|
pub unsafe fn store_f32x2(mask: Vec2<i32>, pointer: *mut f32, values: Vec2<f32>) {
|
||||||
// CHECK: call void @llvm.masked.store.v2f32.p0(<2 x float> {{.*}}, ptr {{.*}}, i32 {{.*}}, <2 x i1> {{.*}})
|
// CHECK: call void @llvm.masked.store.v2f32.p0(<2 x float> {{.*}}, ptr {{.*}}, i32 4, <2 x i1> {{.*}})
|
||||||
simd_masked_store(mask, pointer, values)
|
simd_masked_store(mask, pointer, values)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue