[LLVMdev] Dragonegg + IR + llc = Dragonegg directly
Gordon Keiser
gkeiser at arxan.com
Tue Apr 17 17:37:01 PDT 2012
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Anton Korobeynikov
> Sent: Tuesday, April 17, 2012 12:04 PM
> To: Duncan Sands
> Cc: llvmdev at cs.uiuc.edu
> Subject: Re: [LLVMdev] Dragonegg + IR + llc = Dragonegg directly
>
> > You may also need to turn off some cpu attributes like SSE, I don't
> > recall, see
> > llc -mcpu=help test.ll
> Maybe it'd be easier at dragonegg level -mfpmath=sse / x87 - and compare
> the results
>
Indeed. Various GCC flavors (and probably gfortran) default to using x87 math which uses 80 bit intermediates internally for 64 bit calculations. LLVM tends to be smarter and tries to use SSE if the host proc supports it. SSE uses 64 bit throughout the path, so the results often do not match up in the lower bits, and can propagate into much larger differences given a large enough number of operations.
-Gordon Keiser
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>
> _______________________________________________
> 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-dev
mailing list