Bin Tzeng
2013-Jun-21 15:49 UTC
[LLVMdev] Error in the example of sext instruction in reference manual
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-dev/attachments/20130621/ae701fdc/attachment.html>
Caldarale, Charles R
2013-Jun-21 16:04 UTC
[LLVMdev] Error in the example of sext instruction in reference manual
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Bin Tzeng > Subject: Re: [LLVMdev] Error in the example of sext instruction in reference manual> Just for a little more clarity, is i16, i32... signed, unsigned, or > just a bit pattern?It's just a bit pattern. The operations performed on it can treat it as signed, unsigned, or whatever, as appropriate. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Bin Tzeng
2013-Jun-21 16:16 UTC
[LLVMdev] Error in the example of sext instruction in reference manual
Thanks for the clarification! On Fri, Jun 21, 2013 at 9:04 AM, Caldarale, Charles R < Chuck.Caldarale at unisys.com> wrote:> > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Bin Tzeng > > Subject: Re: [LLVMdev] Error in the example of sext instruction in > reference manual > > > Just for a little more clarity, is i16, i32... signed, unsigned, or > > just a bit pattern? > > It's just a bit pattern. The operations performed on it can treat it as > signed, unsigned, or whatever, as appropriate. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail and > its attachments from all computers. > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130621/421a1efc/attachment.html>
Maybe Matching Threads
- [LLVMdev] Error in the example of sext instruction in reference manual
- [LLVMdev] Error in the example of sext instruction in reference manual
- [LLVMdev] Error in the example of sext instruction in reference manual
- [LLVMdev] What would cause instructions to NOT make it into the module?
- JIT compiler and calls to existing functions