[llvm-commits] [llvm] r90791 - /llvm/trunk/test/FrontendC/2009-12-07-BitFieldAlignment.c
Evan Cheng
evan.cheng at apple.com
Mon Dec 7 11:42:22 PST 2009
Author: evancheng
Date: Mon Dec 7 13:42:22 2009
New Revision: 90791
URL: http://llvm.org/viewvc/llvm-project?rev=90791&view=rev
Log:
Test case for 90787.
Added:
llvm/trunk/test/FrontendC/2009-12-07-BitFieldAlignment.c
Added: llvm/trunk/test/FrontendC/2009-12-07-BitFieldAlignment.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/2009-12-07-BitFieldAlignment.c?rev=90791&view=auto
==============================================================================
--- llvm/trunk/test/FrontendC/2009-12-07-BitFieldAlignment.c (added)
+++ llvm/trunk/test/FrontendC/2009-12-07-BitFieldAlignment.c Mon Dec 7 13:42:22 2009
@@ -0,0 +1,15 @@
+// RUN: %llvmgcc -m32 %s -S -o - | FileCheck %s
+// Set alignment on bitfield accesses.
+
+struct S {
+ int a, b;
+ void *c;
+ unsigned d : 8;
+ unsigned e : 8;
+};
+
+void f0(struct S *a) {
+// CHECK: %3 = load i32* %2, align 4
+// CHECK: store i32 %4, i32* %2, align 4
+ a->e = 0;
+}
More information about the llvm-commits
mailing list