r218248 - [mips] Correct alignment of vectors passed in varargs for the O32 ABI.

Daniel Sanders Daniel.Sanders at imgtec.com
Tue Sep 23 02:12:11 PDT 2014


> 1) always use %clang_cc1 in test/CodeGen. Only test/Driver should use %clang really.

Ok. Kaelyn has already fixed this in r218260.

> 2) please, please don't use -O3!!! This is *way* too coupled to the inner details of LLVM.

I've switched it down to –O1 in r218298.

Thanks for noticing, and thanks to Kaelyn for fixing the first issue.

From: Chandler Carruth [mailto:chandlerc at google.com]
Sent: 22 September 2014 19:13
To: Daniel Sanders
Cc: llvm cfe
Subject: Re: r218248 - [mips] Correct alignment of vectors passed in varargs for the O32 ABI.


On Mon, Sep 22, 2014 at 6:27 AM, Daniel Sanders <daniel.sanders at imgtec.com<mailto:daniel.sanders at imgtec.com>> wrote:
URL: http://llvm.org/viewvc/llvm-project?rev=218248&view=rev
Log:
[mips] Correct alignment of vectors passed in varargs for the O32 ABI.

Summary:
Vectors are normally 16-byte aligned, however the O32 ABI enforces a
maximum alignment of 8-bytes since the base of the stack is 8-byte aligned.
Previously, this was enforced on the caller side, but not on the callee side.

This summary *sounds* like a simple correctness fix, but your test case:

--- cfe/trunk/test/CodeGen/mips-varargs.c (added)
+++ cfe/trunk/test/CodeGen/mips-varargs.c Mon Sep 22 08:27:06 2014
@@ -0,0 +1,53 @@
+// RUN: %clang -target mips-unknown-linux -O3 -S -o - -emit-llvm %s | FileCheck %s -check-prefix=ALL -check-prefix=O32
+// RUN: %clang -target mips64-unknown-linux -O3 -S -o - -emit-llvm -mabi=n32 %s | FileCheck %s -check-prefix=ALL -check-prefix=N32
+// RUN: %clang -target mips64-unknown-linux -O3 -S -o - -emit-llvm %s | FileCheck %s -check-prefix=ALL -check-prefix=N64

Whoa!

1) always use %clang_cc1 in test/CodeGen. Only test/Driver should use %clang really.

2) please, please don't use -O3!!! This is *way* too coupled to the inner details of LLVM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140923/1878462f/attachment.html>


More information about the cfe-commits mailing list