From b348d18caf834bc26a80e60aa7a2c9b1748734e8 Mon Sep 17 00:00:00 2001 From: Nate Begeman Date: Sat, 17 Nov 2007 03:58:34 +0000 Subject: Add support for vectors to int <-> float casts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44204 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 55 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 21 deletions(-) (limited to 'docs/LangRef.html') diff --git a/docs/LangRef.html b/docs/LangRef.html index c6cbe29..9c4bbf0 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -1511,23 +1511,31 @@ following is the syntax for constant expressions:

fptoui ( CST to TYPE )
Convert a floating point constant to the corresponding unsigned integer - constant. TYPE must be an integer type. CST must be floating point. If the - value won't fit in the integer type, the results are undefined.
+ constant. TYPE must be a scalar or vector integer type. CST must be of scalar + or vector floating point type. Both CST and TYPE must be scalars, or vectors + of the same number of elements. If the value won't fit in the integer type, + the results are undefined.
fptosi ( CST to TYPE )
Convert a floating point constant to the corresponding signed integer - constant. TYPE must be an integer type. CST must be floating point. If the - value won't fit in the integer type, the results are undefined.
+ constant. TYPE must be a scalar or vector integer type. CST must be of scalar + or vector floating point type. Both CST and TYPE must be scalars, or vectors + of the same number of elements. If the value won't fit in the integer type, + the results are undefined.
uitofp ( CST to TYPE )
Convert an unsigned integer constant to the corresponding floating point - constant. TYPE must be floating point. CST must be of integer type. If the - value won't fit in the floating point type, the results are undefined.
+ constant. TYPE must be a scalar or vector floating point type. CST must be of + scalar or vector integer type. Both CST and TYPE must be scalars, or vectors + of the same number of elements. If the value won't fit in the floating point + type, the results are undefined.
sitofp ( CST to TYPE )
Convert a signed integer constant to the corresponding floating point - constant. TYPE must be floating point. CST must be of integer type. If the - value won't fit in the floating point type, the results are undefined.
+ constant. TYPE must be a scalar or vector floating point type. CST must be of + scalar or vector integer type. Both CST and TYPE must be scalars, or vectors + of the same number of elements. If the value won't fit in the floating point + type, the results are undefined.
ptrtoint ( CST to TYPE )
Convert a pointer typed constant to the corresponding integer constant @@ -3136,8 +3144,10 @@ unsigned integer equivalent of type ty2.
Arguments:

The 'fptoui' instruction takes a value to cast, which must be a -floating point value, and a type to cast it to, which -must be an integer type.

+scalar or vector floating point value, and a type +to cast it to ty2, which must be an integer +type. If ty is a vector floating point type, ty2 must be a +vector integer type with the same number of elements as ty

Semantics:

The 'fptoui' instruction converts its @@ -3169,11 +3179,12 @@ the results are undefined.

floating point value to type ty2.

-
Arguments:

The 'fptosi' instruction takes a value to cast, which must be a -floating point value, and a type to cast it to, which -must also be an integer type.

+scalar or vector floating point value, and a type +to cast it to ty2, which must be an integer +type. If ty is a vector floating point type, ty2 must be a +vector integer type with the same number of elements as ty

Semantics:

The 'fptosi' instruction converts its @@ -3204,18 +3215,18 @@ the results are undefined.

The 'uitofp' instruction regards value as an unsigned integer and converts that value to the ty2 type.

-
Arguments:
-

The 'uitofp' instruction takes a value to cast, which must be an -integer value, and a type to cast it to, which must -be a floating point type.

+

The 'uitofp' instruction takes a value to cast, which must be a +scalar or vector integer value, and a type to cast it +to ty2, which must be an floating point +type. If ty is a vector integer type, ty2 must be a vector +floating point type with the same number of elements as ty

Semantics:

The 'uitofp' instruction interprets its operand as an unsigned integer quantity and converts it to the corresponding floating point value. If the value cannot fit in the floating point value, the results are undefined.

-
Example:
   %X = uitofp i32 257 to float         ; yields float:257.0
@@ -3239,9 +3250,11 @@ the value cannot fit in the floating point value, the results are undefined.

integer and converts that value to the ty2 type.

Arguments:
-

The 'sitofp' instruction takes a value to cast, which must be an -integer value, and a type to cast it to, which must be -a floating point type.

+

The 'sitofp' instruction takes a value to cast, which must be a +scalar or vector integer value, and a type to cast it +to ty2, which must be an floating point +type. If ty is a vector integer type, ty2 must be a vector +floating point type with the same number of elements as ty

Semantics:

The 'sitofp' instruction interprets its operand as a signed -- cgit v1.1