From 485bad1a09550e2ec182a78dba0ed97bf1d9f5ae Mon Sep 17 00:00:00 2001
From: Reid Spencer
A packed type is a simple derived type that represents a vector -of elements. Packed types are used when multiple primitive data +
A vector type is a simple derived type that represents a vector +of elements. Vector types are used when multiple primitive data are operated in parallel using a single instruction (SIMD). -A packed type requires a size (number of +A vector type requires a size (number of elements) and an underlying primitive data type. Vectors must have a power -of two length (1, 2, 4, 8, 16 ...). Packed types are +of two length (1, 2, 4, 8, 16 ...). Vector types are considered first class.
Binary operators are used to do most of the computation in a program. They require two operands, execute an operation on them, and produce a single value. The operands might represent -multiple data, as is the case with the packed data type. +multiple data, as is the case with the vector data type. The result value of a binary operator is not necessarily the same type as its operands.
There are several different binary operators:
@@ -1754,7 +1754,7 @@ InstructionThe two arguments to the 'add' instruction must be either integer or floating point values. - This instruction can also take packed versions of the values. + This instruction can also take vector versions of the values. Both arguments must have identical types.
The value produced is the integer or floating point sum of the two @@ -1779,7 +1779,7 @@ instruction present in most other intermediate representations.
The two arguments to the 'sub' instruction must be either integer or floating point values. -This instruction can also take packed versions of the values. +This instruction can also take vector versions of the values. Both arguments must have identical types.
The value produced is the integer or floating point difference of @@ -1803,7 +1803,7 @@ operands.
The two arguments to the 'mul' instruction must be either integer or floating point values. -This instruction can also take packed versions of the values. +This instruction can also take vector versions of the values. Both arguments must have identical types.
The value produced is the integer or floating point product of the @@ -1828,7 +1828,7 @@ operands.
The two arguments to the 'udiv' instruction must be integer values. Both arguments must have identical -types. This instruction can also take packed versions +types. This instruction can also take vector versions of the values in which case the elements must be integers.
The value produced is the unsigned integer quotient of the two operands. This @@ -1851,7 +1851,7 @@ operands.
The two arguments to the 'sdiv' instruction must be integer values. Both arguments must have identical -types. This instruction can also take packed versions +types. This instruction can also take vector versions of the values in which case the elements must be integers.
The value produced is the signed integer quotient of the two operands. This @@ -1874,7 +1874,7 @@ operands.
The two arguments to the 'div' instruction must be floating point values. Both arguments must have -identical types. This instruction can also take packed +identical types. This instruction can also take vector versions of the values in which case the elements must be floating point.
The value produced is the floating point quotient of the two operands.
@@ -2244,7 +2244,7 @@ target.The 'extractelement' instruction extracts a single scalar -element from a packed vector at a specified index. +element from a vector at a specified index.
@@ -2252,7 +2252,7 @@ element from a packed vector at a specified index.The first operand of an 'extractelement' instruction is a -value of packed type. The second operand is +value of vector type. The second operand is an index indicating the position from which to extract the element. The index may be a variable.
@@ -2290,7 +2290,7 @@ results are undefined.The 'insertelement' instruction inserts a scalar -element into a packed vector at a specified index. +element into a vector at a specified index.
@@ -2298,7 +2298,7 @@ element into a packed vector at a specified index.The first operand of an 'insertelement' instruction is a -value of packed type. The second operand is a +value of vector type. The second operand is a scalar value whose type must equal the element type of the first operand. The third operand is an index indicating the position at which to insert the value. The index may be a variable.
@@ -2306,7 +2306,7 @@ which to insert the value. The index may be a variable.-The result is a packed vector of the same type as val. Its +The result is a vector of the same type as val. Its element values are those of val except at position idx, where it gets the value elt. If idx exceeds the length of val, the results are undefined. diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html index a96a676c600..aa1fe402ff9 100644 --- a/docs/ProgrammersManual.html +++ b/docs/ProgrammersManual.html @@ -2315,9 +2315,9 @@ the lib/VMCore directory.