message: Fix masking in vcall_jit_reduce
diff: @@ -60,7 +60,9 @@ Result vcall_jit_reduce_impl(Func func, const Self &self,
  Result result;
  if (n_inst > 0 && self_size > 0) {
  Mask mask = extract_mask<Mask>(args...);
  - mask &= Mask::steal(jit_var_mask_default(Backend));
  +
  + Mask mask_default = Mask::steal(jit_var_mask_default(Backend));
  + mask &= mask_default;
  if (jit_var_mask_size(Backend))
  mask &= Mask::steal(jit_var_mask_peek(Backend));
  @@ -68,8 +70,8 @@ Result vcall_jit_reduce_impl(Func func, const Self &self,
  result = empty<Result>(self_size);
  for (size_t i = 0; i < n_inst ; ++i) {
  UInt32 perm = UInt32::borrow(buckets[i].index);
  - MaskScope<Mask> scope(gather<Mask>(mask, perm));
  if (buckets[i].ptr) {
  + MaskScope<Mask> scope(gather<Mask>(mask, perm));
  if constexpr (!std::is_same_v<Result, std::nullptr_t>) {
  using OrigResult = decltype(func((Class) nullptr, args...));
  scatter<true>(
  @@ -82,6 +84,7 @@ Result vcall_jit_reduce_impl(Func func, const Self &self,
  func((Class) buckets[i].ptr, gather_helper<Is, N>(args, perm)...);
  }
  } else {
  + MaskScope<Mask> scope(mask_default);
  if constexpr (!std::is_same_v<Result, std::nullptr_t>)
  scatter<true>(result, zero<Result>(), perm);
  }
  