<div dir="ltr">I went ahead and removed it in r222697.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 24, 2014 at 1:54 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Why do we have this environment switch? All supported environments on Windows return small structs in EAX:EDX. Looks like you added it back in r204978 and we don't actually need it.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 24, 2014 at 12:14 PM, Saleem Abdulrasool <span dir="ltr"><<a href="mailto:compnerd@compnerd.org" target="_blank">compnerd@compnerd.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: compnerd<br>
Date: Mon Nov 24 14:14:29 2014<br>
New Revision: 222680<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=222680&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=222680&view=rev</a><br>
Log:<br>
CodeGen: make i686-windows-itanium more similar to msvc<br>
<br>
The itanium environment follows the system calling convention for structures.<br>
Pass small aggregates via registers.<br>
<br>
Modified:<br>
cfe/trunk/lib/CodeGen/TargetInfo.cpp<br>
cfe/trunk/test/CodeGen/windows-struct-abi.c<br>
<br>
Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=222680&r1=222679&r2=222680&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=222680&r1=222679&r2=222680&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Mon Nov 24 14:14:29 2014<br>
@@ -1307,6 +1307,7 @@ bool X86_32TargetCodeGenInfo::isStructRe<br>
case llvm::Triple::UnknownEnvironment:<br>
case llvm::Triple::Cygnus:<br>
case llvm::Triple::GNU:<br>
+ case llvm::Triple::Itanium:<br>
case llvm::Triple::MSVC:<br>
return true;<br>
default:<br>
<br>
Modified: cfe/trunk/test/CodeGen/windows-struct-abi.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/windows-struct-abi.c?rev=222680&r1=222679&r2=222680&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/windows-struct-abi.c?rev=222680&r1=222679&r2=222680&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGen/windows-struct-abi.c (original)<br>
+++ cfe/trunk/test/CodeGen/windows-struct-abi.c Mon Nov 24 14:14:29 2014<br>
@@ -6,7 +6,7 @@ struct f1 {<br>
<br>
struct f1 return_f1(void) { while (1); }<br>
<br>
-// CHECK: define void @return_f1(%struct.f1* noalias sret %agg.result)<br>
+// CHECK: define i32 @return_f1()<br>
<br>
void receive_f1(struct f1 a0) { }<br>
<br>
@@ -19,9 +19,24 @@ struct f2 {<br>
<br>
struct f2 return_f2(void) { while (1); }<br>
<br>
-// CHECK: define void @return_f2(%struct.f2* noalias sret %agg.result)<br>
+// CHECK: define i64 @return_f2()<br>
<br>
void receive_f2(struct f2 a0) { }<br>
<br>
// CHECK: define void @receive_f2(%struct.f2* byval align 4 %a0)<br>
<br>
+struct f4 {<br>
+ float f;<br>
+ float g;<br>
+ float h;<br>
+ float i;<br>
+};<br>
+<br>
+struct f4 return_f4(void) { while (1); }<br>
+<br>
+// CHECK: define void @return_f4(%struct.f4* noalias sret %agg.result)<br>
+<br>
+void receive_f4(struct f4 a0) { }<br>
+<br>
+// CHECK: define void @receive_f4(%struct.f4* byval align 4 %a0)<br>
+<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>