Skip to content

Commit a4f0f09

Browse files
committed
Rename to simd_masked_load
1 parent 20e8c4c commit a4f0f09

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

compiler/rustc_codegen_llvm/src/intrinsic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,8 +1492,8 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
14921492
return Ok(v);
14931493
}
14941494

1495-
if name == sym::simd_load {
1496-
// simd_load(values: <N x T>, pointer: *_ T, mask: <N x i{M}>) -> <N x T>
1495+
if name == sym::simd_masked_load {
1496+
// simd_masked_load(values: <N x T>, pointer: *_ T, mask: <N x i{M}>) -> <N x T>
14971497
// * N: number of elements in the input vectors
14981498
// * T: type of the element to load
14991499
// * M: any integer width is supported, will be truncated to i1

compiler/rustc_hir_analysis/src/check/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ pub fn check_platform_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>)
540540
sym::simd_fpowi => (1, 0, vec![param(0), tcx.types.i32], param(0)),
541541
sym::simd_fma => (1, 0, vec![param(0), param(0), param(0)], param(0)),
542542
sym::simd_gather => (3, 0, vec![param(0), param(1), param(2)], param(0)),
543-
sym::simd_load => (3, 0, vec![param(0), param(1), param(2)], param(0)),
543+
sym::simd_masked_load => (3, 0, vec![param(0), param(1), param(2)], param(0)),
544544
sym::simd_scatter => (3, 0, vec![param(0), param(1), param(2)], Ty::new_unit(tcx)),
545545
sym::simd_insert => (2, 0, vec![param(0), tcx.types.u32, param(1)], param(0)),
546546
sym::simd_extract => (2, 0, vec![param(0), tcx.types.u32], param(1)),

compiler/rustc_span/src/symbol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,8 +1531,8 @@ symbols! {
15311531
simd_gt,
15321532
simd_insert,
15331533
simd_le,
1534-
simd_load,
15351534
simd_lt,
1535+
simd_masked_load,
15361536
simd_mul,
15371537
simd_ne,
15381538
simd_neg,

tests/codegen/simd-intrinsic/simd-intrinsic-generic-load.rs renamed to tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ pub struct Vec2<T>(pub T, pub T);
1616
pub struct Vec4<T>(pub T, pub T, pub T, pub T);
1717

1818
extern "platform-intrinsic" {
19-
fn simd_load<T, P, M>(values: T, pointer: P, mask: M) -> T;
19+
fn simd_masked_load<T, P, M>(values: T, pointer: P, mask: M) -> T;
2020
}
2121

2222
// CHECK-LABEL: @load_f32x2
2323
#[no_mangle]
2424
pub unsafe fn load_f32x2(pointer: *const f32, mask: Vec2<i32>,
2525
values: Vec2<f32>) -> Vec2<f32> {
2626
// CHECK: call <2 x float> @llvm.masked.load.v2f32.p0(ptr {{.*}}, i32 {{.*}}, <2 x i1> {{.*}}, <2 x float> {{.*}})
27-
simd_load(values, pointer, mask)
27+
simd_masked_load(values, pointer, mask)
2828
}
2929

3030
// CHECK-LABEL: @load_pf32x2
3131
#[no_mangle]
3232
pub unsafe fn load_pf32x2(pointer: *const *const f32, mask: Vec2<i32>,
3333
values: Vec2<*const f32>) -> Vec2<*const f32> {
3434
// CHECK: call <2 x ptr> @llvm.masked.load.v2p0.p0({{.*}}, i32 {{.*}}, <2 x i1> {{.*}}, <2 x ptr> {{.*}})
35-
simd_load(values, pointer, mask)
35+
simd_masked_load(values, pointer, mask)
3636
}

0 commit comments

Comments
 (0)