On Tue, Aug 7, 2012 at 10:59 AM, Anton Korobeynikov <anton at korobeynikov.info> wrote:>>> See ARMCallingConv.td:113. The alignment of the arg is checked and if >>> it's 8-byte aligned, the proper registers are chosen. >> >> Are you sure? In this case, it looks like the frontend is translating the argument type to [2 x i32], so it's not going to have 8-byte alignment. This looks like a bug to me (but I haven't actually tried it). > It seems this will work for double's only when passing inside GP regs, > but not for anything else...Which is how llvm-gcc lowered this. This is a clang bug.> Probably all the "alignment" logic needs to be moved upper to frontend...There have been several proposals to unify all this argument passing logic, but most have focused on doing it later in the backend. deep
> Which is how llvm-gcc lowered this. This is a clang bug. > >> Probably all the "alignment" logic needs to be moved upper to frontend... > > There have been several proposals to unify all this argument passing > logic, but most have focused on doing it later in the backend.A long time ago I did this for ppc on llvm-gcc by adding dummy arguments when passing in registers. When passing on the stack byval can take an alignment.> deepCheers, Rafael
I filed a bug report here. http://llvm.org/bugs/show_bug.cgi?id=13562 On Wed, Aug 8, 2012 at 1:29 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:> > Which is how llvm-gcc lowered this. This is a clang bug. > > > >> Probably all the "alignment" logic needs to be moved upper to > frontend... > > > > There have been several proposals to unify all this argument passing > > logic, but most have focused on doing it later in the backend. > > A long time ago I did this for ppc on llvm-gcc by adding dummy > arguments when passing in registers. When passing on the stack byval > can take an alignment. > > > deep > > Cheers, > Rafael > _______________________________________________ > 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/20120808/2ec92dba/attachment.html>