func @bitCast = <{FROM: Type, TO: Type}> (from: FROM) -> TO;
Convert a value of any type to any other of the same size. Requires that @sizeOf<{FROM}>() == @sizeOf<{TO}>()
. FROM
and TO
must be different types.
func @trunc = <{FROM: Type, TO: Type}> (from: FROM) -> TO;
Truncate any integral
type to any other smaller integral
type. Both FROM
and TO
must be integral
or a vector
of integral
. Requires @sizeOf<{FROM}>() > @sizeOf<{TO}>()
. If is a vector
, the lenghts of the vectors must be the same size.
func @ftrunc = <{FROM: Type, TO: Type}> (from: FROM) -> TO;
Truncate any floating-point
type to any other smaller floating-point
type. Both FROM
and TO
must be floating-point
or a vector
of floating-point
. Requires the floating-point
width of FROM
to be greater than that of TO
. If is a vector
, the lenghts of the vectors must be the same size.
func @sext = <{FROM: Type, TO: Type}> (from: FROM) -> TO;
Sign extend any integral
type to any other larger integral
type. Both FROM
and TO
must be integral
or a vector
of integral
. Requires @sizeOf<{FROM}>() < @sizeOf<{TO}>()
. If is a vector
, the lenghts of the vectors must be the same size.
func @zext = <{FROM: Type, TO: Type}> (from: FROM) -> TO;
Zero extend any integral
type to any other larger integral
type. Both FROM
and TO
must be integral
or a vector
of integral
. Requires @sizeOf<{FROM}>() < @sizeOf<{TO}>()
. If is a vector
, the lenghts of the vectors must be the same size.
func @fext = <{FROM: Type, TO: Type}> (from: FROM) -> TO;
Extend any floating-point
type to any other larger floating-point
type. Both FROM
and TO
must be floating-point
or a vector
of floating-point
. Requires the floating-point
width of FROM
to be smaller than that of TO
. If is a vector
, the lenghts of the vectors must be the same size.
func @iToF = <{FROM: Type, TO: Type}> (from: FROM) -> TO;
Convert any integral
or vector
of integral
type to any floating-point
type. FROM
must be integral
and TO
must be floating-point
.
func @fToI = <{FROM: Type, TO: Type}> (from: FROM) -> TO;
Convert any floating-point
or vector
of floating-point
type to any integral
. FROM
must be floating-point
and TO
must be integral
.