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

Bin Tzeng bintzeng at gmail.com
Fri Jun 21 08:49:15 PDT 2013


Thanks for the reply. Just for a little more clarity, is i16, i32...
signed, unsigned, or just a bit pattern?



On Thu, Jun 20, 2013 at 9:17 PM, Chris Lattner <clattner at apple.com> wrote:

>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130621/ae701fdc/attachment.html>


More information about the llvm-commits mailing list