<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 28, 2013 at 11:25 AM, Timur Iskhodzhanov <span dir="ltr"><<a href="mailto:timurrrr@google.com" target="_blank">timurrrr@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2013/3/28 Timur Iskhodzhanov <<a href="mailto:timurrrr@google.com">timurrrr@google.com</a>>:<br>
<div class="im">> [just realized I've forgotten to CC llvm-commits last time, so re-sending]<br>
><br>
> Hi Eli, Nick,<br>
><br>
> Please see <a href="http://llvm.org/PR15556" target="_blank">llvm.org/PR15556</a> - it turns out we don't put the SRet<br>
> address into EAX in the function prolog, though we should (similar to<br>
> Win64).<br>
> The attached patch fixes this for i686-pc-win32.<br>
><br>
> Please note that for some reason if I don't do the<br>
>   lib/Target/X86/X86ISelLowering.cpp:[1670-1690]<br>
> part of the patch, the test still passes.<br>
> I'd appreciate if you could suggest me a test case for those lines in win32.<br>
> I feel like this part of the change should be there (based on<br>
> comments), but something weird prevents me from checking that using<br>
> llc | FileCheck.<br>
><br>
> FTR, I ran<br>
>   llc -mtriple=i686-pc-win32 -O0 < test/CodeGen/X86/x86-64-sret-return.ll<br>
> and<br>
>   llc -mtriple=i686-pc-win32 -O0 < test/CodeGen/X86/x86-64-ptr-arg-simple.ll<br>
> with and without the [1670-1690] changes and the result is identical.<br>
</div>A-ha, I came up with a good test which does require the [1670-1690]<br>
part of the change.<br>
See an updated patch! (the test is the new sret3 function)<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div style>LGTM</div><div style> </div></div></div></div>