From f8856bc4034b43ef781ea7a04eeb78a417d3accf Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 13 Aug 2002 20:52:09 +0000 Subject: [PATCH] Add a note that specifies that the whether or not sign extension is done by a cast is determined by the source operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3304 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index a23d68a79ad..e6e9c30d69a 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -1603,6 +1603,11 @@ When casting to bool, any value that would be considered true in the context of a C 'if' condition is converted to the boolean 'true' values, all else are 'false'.

+When extending an integral value from a type of one signness to another (for +example 'sbyte' to 'ulong'), the value is sign-extended if the +source value is signed, and zero-extended if the source value is +unsigned.

+

Example:
   %X = cast int 257 to ubyte              ; yields ubyte:1
@@ -1736,7 +1741,7 @@ more...
 
Chris Lattner
-Last modified: Tue Jun 25 15:19:34 CDT 2002 +Last modified: Tue Aug 13 15:50:47 CDT 2002