Fix PR15556 - Make Win32 put the SRet address into EAX

Eli Bendersky eliben at google.com
Thu Mar 28 12:27:07 PDT 2013


On Thu, Mar 28, 2013 at 11:25 AM, Timur Iskhodzhanov <timurrrr at google.com>wrote:

> 2013/3/28 Timur Iskhodzhanov <timurrrr at google.com>:
> > [just realized I've forgotten to CC llvm-commits last time, so
> re-sending]
> >
> > Hi Eli, Nick,
> >
> > Please see llvm.org/PR15556 - it turns out we don't put the SRet
> > address into EAX in the function prolog, though we should (similar to
> > Win64).
> > The attached patch fixes this for i686-pc-win32.
> >
> > Please note that for some reason if I don't do the
> >   lib/Target/X86/X86ISelLowering.cpp:[1670-1690]
> > part of the patch, the test still passes.
> > I'd appreciate if you could suggest me a test case for those lines in
> win32.
> > I feel like this part of the change should be there (based on
> > comments), but something weird prevents me from checking that using
> > llc | FileCheck.
> >
> > FTR, I ran
> >   llc -mtriple=i686-pc-win32 -O0 < test/CodeGen/X86/x86-64-sret-return.ll
> > and
> >   llc -mtriple=i686-pc-win32 -O0 <
> test/CodeGen/X86/x86-64-ptr-arg-simple.ll
> > with and without the [1670-1690] changes and the result is identical.
> A-ha, I came up with a good test which does require the [1670-1690]
> part of the change.
> See an updated patch! (the test is the new sret3 function)
>
>
LGTM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130328/30546e75/attachment.html>


More information about the llvm-commits mailing list