Rename as_bool to as_truthy, and fix TypeSet::as_bool (#6027)

This commit is contained in:
Trevor Elliott
2023-03-17 14:11:24 -07:00
committed by GitHub
parent 2c40c267d4
commit 78dbe93f21
6 changed files with 49 additions and 33 deletions

View File

@@ -871,7 +871,7 @@ where
V::bool(
fcmp(inst.fp_cond_code().unwrap(), &x, &y).unwrap(),
ctrl_ty.is_vector(),
ctrl_ty.lane_type().as_bool(),
ctrl_ty.lane_type().as_truthy(),
)
})
.collect::<ValueResult<SimdVec<V>>>()?),
@@ -979,7 +979,7 @@ where
}
Opcode::Bmask => assign({
let bool = arg(0)?;
let bool_ty = ctrl_ty.as_bool_pedantic();
let bool_ty = ctrl_ty.as_truthy_pedantic();
let lanes = extractlanes(&bool, bool_ty)?
.into_iter()
.map(|lane| lane.convert(ValueConversionKind::Mask(ctrl_ty.lane_type())))
@@ -1461,7 +1461,7 @@ where
)?)
};
let dst_ty = ctrl_ty.as_bool();
let dst_ty = ctrl_ty.as_truthy();
let left = extractlanes(left, ctrl_ty)?;
let right = extractlanes(right, ctrl_ty)?;