diff options
author | dim <dim@FreeBSD.org> | 2011-02-26 22:03:50 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-02-26 22:03:50 +0000 |
commit | c80ac9d286b8fcc6d1ee5d76048134cf80aa9edc (patch) | |
tree | ddf53b8bd9235bcb0b8aae16c5e22310dcdad665 /docs/LangRef.html | |
parent | cbb70ce070d220642b038ea101d9c0f9fbf860d6 (diff) | |
download | FreeBSD-src-c80ac9d286b8fcc6d1ee5d76048134cf80aa9edc.zip FreeBSD-src-c80ac9d286b8fcc6d1ee5d76048134cf80aa9edc.tar.gz |
Vendor import of llvm trunk r126547:
http://llvm.org/svn/llvm-project/llvm/trunk@126547
Diffstat (limited to 'docs/LangRef.html')
-rw-r--r-- | docs/LangRef.html | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html index 05130c2..580ae79 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -4575,12 +4575,12 @@ entry: type <tt>ty2</tt>.</p> <h5>Arguments:</h5> -<p>The '<tt>trunc</tt>' instruction takes a <tt>value</tt> to trunc, which must - be an <a href="#t_integer">integer</a> type, and a type that specifies the - size and type of the result, which must be - an <a href="#t_integer">integer</a> type. The bit size of <tt>value</tt> must - be larger than the bit size of <tt>ty2</tt>. Equal sized types are not - allowed.</p> +<p>The '<tt>trunc</tt>' instruction takes a value to trunc, and a type to trunc it to. + Both types must be of <a href="#t_integer">integer</a> types, or vectors + of the same number of integers. + The bit size of the <tt>value</tt> must be larger than + the bit size of the destination type, <tt>ty2</tt>. + Equal sized types are not allowed.</p> <h5>Semantics:</h5> <p>The '<tt>trunc</tt>' instruction truncates the high order bits @@ -4590,9 +4590,10 @@ entry: <h5>Example:</h5> <pre> - %X = trunc i32 257 to i8 <i>; yields i8:1</i> - %Y = trunc i32 123 to i1 <i>; yields i1:true</i> - %Z = trunc i32 122 to i1 <i>; yields i1:false</i> + %X = trunc i32 257 to i8 <i>; yields i8:1</i> + %Y = trunc i32 123 to i1 <i>; yields i1:true</i> + %Z = trunc i32 122 to i1 <i>; yields i1:false</i> + %W = trunc <2 x i16> <i16 8, i16 7> to <2 x i8> <i>; yields <i8 8, i8 7></i> </pre> </div> @@ -4614,10 +4615,11 @@ entry: <h5>Arguments:</h5> -<p>The '<tt>zext</tt>' instruction takes a value to cast, which must be of - <a href="#t_integer">integer</a> type, and a type to cast it to, which must - also be of <a href="#t_integer">integer</a> type. The bit size of the - <tt>value</tt> must be smaller than the bit size of the destination type, +<p>The '<tt>zext</tt>' instruction takes a value to cast, and a type to cast it to. + Both types must be of <a href="#t_integer">integer</a> types, or vectors + of the same number of integers. + The bit size of the <tt>value</tt> must be smaller than + the bit size of the destination type, <tt>ty2</tt>.</p> <h5>Semantics:</h5> @@ -4630,6 +4632,7 @@ entry: <pre> %X = zext i32 257 to i64 <i>; yields i64:257</i> %Y = zext i1 true to i32 <i>; yields i32:1</i> + %Z = zext <2 x i16> <i16 8, i16 7> to <2 x i32> <i>; yields <i32 8, i32 7></i> </pre> </div> @@ -4649,10 +4652,11 @@ entry: <p>The '<tt>sext</tt>' sign extends <tt>value</tt> to the type <tt>ty2</tt>.</p> <h5>Arguments:</h5> -<p>The '<tt>sext</tt>' instruction takes a value to cast, which must be of - <a href="#t_integer">integer</a> type, and a type to cast it to, which must - also be of <a href="#t_integer">integer</a> type. The bit size of the - <tt>value</tt> must be smaller than the bit size of the destination type, +<p>The '<tt>sext</tt>' instruction takes a value to cast, and a type to cast it to. + Both types must be of <a href="#t_integer">integer</a> types, or vectors + of the same number of integers. + The bit size of the <tt>value</tt> must be smaller than + the bit size of the destination type, <tt>ty2</tt>.</p> <h5>Semantics:</h5> @@ -4666,6 +4670,7 @@ entry: <pre> %X = sext i8 -1 to i16 <i>; yields i16 :65535</i> %Y = sext i1 true to i32 <i>; yields i32:-1</i> + %Z = sext <2 x i16> <i16 8, i16 7> to <2 x i32> <i>; yields <i32 8, i32 7></i> </pre> </div> @@ -7781,7 +7786,7 @@ LLVM</a>.</p> <a href="mailto:sabre@nondot.org">Chris Lattner</a><br> <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br> - Last modified: $Date: 2011-02-09 17:44:44 +0100 (Wed, 09 Feb 2011) $ + Last modified: $Date: 2011-02-24 22:01:34 +0100 (Thu, 24 Feb 2011) $ </address> </body> |