<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 22, 2014 at 6:27 AM, Daniel Sanders <span dir="ltr"><<a href="mailto:daniel.sanders@imgtec.com" target="_blank">daniel.sanders@imgtec.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":3g9" class="a3s" style="overflow:hidden">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=218248&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=218248&view=rev</a><br>
Log:<br>
[<span class="il">mips</span>] Correct alignment of vectors passed in <span class="il">varargs</span> for the O32 ABI.<br>
<br>
Summary:<br>
Vectors are normally 16-byte aligned, however the O32 ABI enforces a<br>
maximum alignment of 8-bytes since the base of the stack is 8-byte aligned.<br>
Previously, this was enforced on the caller side, but not on the callee side.<br></div></blockquote><div><br></div><div>This summary *sounds* like a simple correctness fix, but your test case:</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":3g9" class="a3s" style="overflow:hidden">--- cfe/trunk/test/CodeGen/<span class="il">mips</span>-<span class="il">varargs</span>.<span class="il">c</span> (added)<br>
+++ cfe/trunk/test/CodeGen/<span class="il">mips</span>-<span class="il">varargs</span>.<span class="il">c</span> Mon Sep 22 08:27:06 2014<br>
@@ -0,0 +1,53 @@<br>
+// RUN: %clang -target <span class="il">mips</span>-unknown-linux -O3 -S -o - -emit-llvm %s | FileCheck %s -check-prefix=ALL -check-prefix=O32<br>
+// RUN: %clang -target mips64-unknown-linux -O3 -S -o - -emit-llvm -mabi=n32 %s | FileCheck %s -check-prefix=ALL -check-prefix=N32<br>
+// RUN: %clang -target mips64-unknown-linux -O3 -S -o - -emit-llvm %s | FileCheck %s -check-prefix=ALL -check-prefix=N64</div></blockquote></div><br>Whoa!</div><div class="gmail_extra"><br></div><div class="gmail_extra">1) always use %clang_cc1 in test/CodeGen. Only test/Driver should use %clang really.</div><div class="gmail_extra"><br></div><div class="gmail_extra">2) please, please don't use -O3!!! This is *way* too coupled to the inner details of LLVM.</div></div>