Skip to content

Commit f2f0096

Browse files
committed
Address PR review
1 parent 4d33bd5 commit f2f0096

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,6 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
10131013
intrinsic_args!(fx, args => (val, ptr, mask); intrinsic);
10141014

10151015
let (val_lane_count, val_lane_ty) = val.layout().ty.simd_size_and_type(fx.tcx);
1016-
// let (ptr, ptr_value) = ptr.try_to_ptr().expect("simd_masked_load ptr");
10171016
let (mask_lane_count, _mask_lane_ty) = mask.layout().ty.simd_size_and_type(fx.tcx);
10181017
let (ret_lane_count, ret_lane_ty) = ret.layout().ty.simd_size_and_type(fx.tcx);
10191018
assert_eq!(val_lane_count, mask_lane_count);

compiler/rustc_codegen_llvm/src/intrinsic.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,6 +1497,9 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
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
1500+
// Loads contiguous elements from memory behind `pointer`, but only for
1501+
// those lanes whose `mask` bit is enabled.
1502+
// The memory addresses corresponding to the “off” lanes are not accessed.
15001503

15011504
// The first argument is a passthrough vector providing values for disabled lanes
15021505
let (_, element_ty0) = require_simd!(in_ty, SimdFirst);
@@ -1592,6 +1595,9 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
15921595
// * N: number of elements in the input vectors
15931596
// * T: type of the element to load
15941597
// * M: any integer width is supported, will be truncated to i1
1598+
// Stores contiguous elements to memory behind `pointer`, but only for
1599+
// those lanes whose `mask` bit is enabled.
1600+
// The memory addresses corresponding to the “off” lanes are not accessed.
15951601

15961602
// The first argument is a passthrough vector providing values for disabled lanes
15971603
let (element_len1, element_ty0) = require_simd!(in_ty, SimdFirst);

0 commit comments

Comments
 (0)