[llvm-commits] [llvm] r40687 - /llvm/trunk/test/CFrontend/2007-08-01-LoadStoreAlign.c
Lauro Ramos Venancio
lauro.venancio at gmail.com
Wed Aug 1 13:07:59 PDT 2007
Author: laurov
Date: Wed Aug 1 15:07:59 2007
New Revision: 40687
URL: http://llvm.org/viewvc/llvm-project?rev=40687&view=rev
Log:
Add a test for the load/store alignment.
Added:
llvm/trunk/test/CFrontend/2007-08-01-LoadStoreAlign.c
Added: llvm/trunk/test/CFrontend/2007-08-01-LoadStoreAlign.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2007-08-01-LoadStoreAlign.c?rev=40687&view=auto
==============================================================================
--- llvm/trunk/test/CFrontend/2007-08-01-LoadStoreAlign.c (added)
+++ llvm/trunk/test/CFrontend/2007-08-01-LoadStoreAlign.c Wed Aug 1 15:07:59 2007
@@ -0,0 +1,17 @@
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep -c {align 1} | grep 2
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llvm-as | llc
+
+struct p {
+ char a;
+ int b;
+} __attribute__ ((packed));
+
+struct p t = { 1, 10 };
+struct p u;
+
+int main () {
+ int tmp = t.b;
+ u.b = tmp;
+ return tmp;
+
+}
More information about the llvm-commits
mailing list