Fix PR15556 - Make Win32 put the SRet address into EAX

Timur Iskhodzhanov timurrrr at google.com
Thu Mar 28 14:31:21 PDT 2013


r178291, thanks!

2013/3/28 Reid Kleckner <rnk at google.com>:
> +1, LGTM.
>
>
> On Thu, Mar 28, 2013 at 12:27 PM, Eli Bendersky <eliben at google.com> wrote:
>>
>>
>>
>>
>> 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
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>



More information about the llvm-commits mailing list