pub(super) fn transmute_scalar<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
bx: &mut Bx,
imm: Bx::Value,
from_scalar: Scalar,
to_scalar: Scalar,
) -> Bx::Value
Expand description
Transmutes a single scalar value imm
from from_scalar
to to_scalar
.
This is expected to be in immediate form, as seen in OperandValue::Immediate
or OperandValue::Pair
(so i1
for bools, not i8
, for example).
ICEs if the passed-in imm
is not a value of the expected type for
from_scalar
, such as if it’s a vector or a pair.