[LLVMdev] Error in the example of sext instruction in reference manual

Chris Lattner clattner at apple.com
Thu Jun 20 21:17:40 PDT 2013


On Jun 20, 2013, at 4:39 PM, Bin Tzeng <bintzeng at gmail.com> wrote:

> Hi all,
> 
> There might be a simple error in the LLVM reference manual. The example for sext instruction:
> 
> %X = sext i8 -1 to i16     ; yields i16    :65535
> 
> %X should yield i16: -1, as opposed to 65535.
> Here is the simple patch (also attached):

These are the same value.

-Chris

> 
> Index: docs/LangRef.rst
> ===================================================================
> --- docs/LangRef.rst    (revision 184496)
> +++ docs/LangRef.rst    (working copy)
> @@ -5236,7 +5236,7 @@
>  
>  .. code-block:: llvm
>  
> -      %X = sext i8  -1 to i16              ; yields i16   :65535
> +      %X = sext i8  -1 to i16              ; yields i16:-1
>        %Y = sext i1 true to i32             ; yields i32:-1
>        %Z = sext <2 x i16> <i16 8, i16 7> to <2 x i32> ; yields <i32 8, i32 7>
> 
> 
> Thanks!
> Bin
> <sextExample.diff>_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-commits mailing list