Fix PR15556 - Make Win32 put the SRet address into EAX

Timur Iskhodzhanov timurrrr at google.com
Thu Mar 28 10:46:03 PDT 2013


[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.

Anton,
Please tell me if you feel this should also be applied to i686-pc-mingw.
(e.g., isTargetWindows() should be replaced with isTargetWin32() and
the MinGW part of the test should be expanded).

--
Timur
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_15556.patch
Type: application/octet-stream
Size: 6239 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130328/934014af/attachment.obj>


More information about the llvm-commits mailing list