[LLVMbugs] Miscompilation of 2003-05-26-Shorts.c on Sparc

Chris Lattner sabre at nondot.org
Wed Oct 22 13:12:23 PDT 2003


On Wed, 22 Oct 2003, Vikram S. Adve wrote:

> Ok, I think all of our systems are fine.  Lli and llc produce identical
> (and correct) outputs.  CBE produces a different output but that was
> also compiled with the same native compiler (gcc).

Ok, sounds good.  I consider that to be "not-a-bug" then, at least not
ours.  :)

-Chris

> > -----Original Message-----
> > From: llvmbugs-admin at cs.uiuc.edu
> > [mailto:llvmbugs-admin at cs.uiuc.edu] On Behalf Of Chris Lattner
> > Sent: Wednesday, October 22, 2003 1:26 PM
> > To: Vikram S. Adve
> > Cc: LLVMbugs list
> > Subject: RE: [LLVMbugs] Miscompilation of 2003-05-26-Shorts.c on Sparc
> >
> >
> > On Wed, 22 Oct 2003, Vikram S. Adve wrote:
> >
> > > Here are the outputs that get generated.  As I said I
> > assumed bugpoint
> > > wouldn't help so I didn't investigate beyond that:
> > >
> > tank:/localhome/vadve/llvm/test/Programs/SingleSource/UnitTest
> > s/2003-05-
> > > 26-Shorts.out-*
> >
> > It looks like a bug in the native compiler.  This appears to
> > be completely
> > portable:
> > unsigned long long getL() {
> >   return 0xafafafafc5c5b8a3ull;
> > }
> > ...
> >   unsigned long long  UL = getL();
> >   unsigned short us = (unsigned short) UL;
> >   printf("UL-us = %lld (0x%llx)\n", UL-us, UL-us);
> > ...
> >
> > The native compiler you are using prints zero for the result of the
> > subtraction, instead of 0xafafafafc5c50000, like it should.
> >
> > -Chris
> >
> > --
> > http://llvm.cs.uiuc.edu/
> > http://www.nondot.org/~sabre/Projects/
> >
> > _______________________________________________
> > LLVMbugs mailing list
> > LLVMbugs at cs.uiuc.edu
> > http://mail.cs.uiuc.edu/mailman/listinfo/llvmbugs
> >
>

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/




More information about the llvm-bugs mailing list