On Sun, Oct 19, 2014 at 6:11 AM, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:> On Fri, Oct 17, 2014 at 06:51:38PM +0400, Anton Korobeynikov wrote: > > > Chandler’s complex arithmetic changes are also in the range: r219557 > in clang. We saw it change the code in mandel-2 significantly. > > mandel-2 is broken on hard FP ABI systems, btw. The reason is simply: > > we're emitting a call to __muldc3 with AAPCS VFP calling convention, > > however, the function expects softfp (AAPCS) calling conv and reads > > garbage from GP registers. > > One possible approach is the attached patch. It is not completely > correct as it doesn't handle the possible exceptions for WoA and iOS, > but it might be a starting point. The real question for me is whether > this logic belongs into clang at all. Who can speak up for the Fortran > related behavior of complex arithmetic? If it matters the desired C > rules, especially with regard to real and imaginary numbers, it would > strongly support putting it into IR properly. >I apologize that I haven't been able to follow this thread entirely, but if someone gives me a Fortran testcase I can check what Fortran+llvm would do currently and maybe give more feedback. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141019/7e3f320f/attachment.html>
On Sun, Oct 19, 2014 at 06:31:24AM +0700, C Bergström wrote:> I apologize that I haven't been able to follow this thread entirely, but if > someone gives me a Fortran testcase I can check what Fortran+llvm would do > currently and maybe give more feedback.Short version: if you multiple or divide a complex number by a real number, is it valid to just do the trivial component wise computation? What about multiplying with / dividing by a pure imaginary number? Joerg
On Sun, Oct 19, 2014 at 6:45 AM, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:> On Sun, Oct 19, 2014 at 06:31:24AM +0700, C Bergström wrote: > > I apologize that I haven't been able to follow this thread entirely, but > if > > someone gives me a Fortran testcase I can check what Fortran+llvm would > do > > currently and maybe give more feedback. > > Short version: if you multiple or divide a complex number by a real > number, is it valid to just do the trivial component wise computation? > What about multiplying with / dividing by a pure imaginary number? >I'll try to get a solid answer, but for clarity.. Fortran has types REAL and CMPLX. I'm not sure if you mean INT or REAL when you say "real" number.. https://gcc.gnu.org/onlinedocs/gfortran/CMPLX.html https://gcc.gnu.org/onlinedocs/gfortran/REAL.html -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141019/5245a4f3/attachment.html>
Reasonably Related Threads
- [LLVMdev] Performance regression on ARM
- [LLVMdev] Performance regression on ARM
- [LLVMdev] MemorySanitizer, a tool that finds uninitialized reads and more
- [LLVMdev] MemorySanitizer, a tool that finds uninitialized reads and more
- [LLVMdev] MemorySanitizer, a tool that finds uninitialized reads and more