diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
| commit | 486754660bb926339aefcf012a3f848592babb8b (patch) | |
| tree | ecdbc446c9876f4f120f701c243373cd3cb43db3 /test/CodeGen/function-alignment.c | |
| parent | 55e6d896ad333f07bb3b1ba487df214fc268a4ab (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/function-alignment.c')
| -rw-r--r-- | test/CodeGen/function-alignment.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/function-alignment.c b/test/CodeGen/function-alignment.c new file mode 100644 index 000000000000..8564ceb02354 --- /dev/null +++ b/test/CodeGen/function-alignment.c @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-NONE +// RUN: %clang_cc1 -emit-llvm -function-alignment 4 %s -o - | FileCheck %s -check-prefix CHECK-16 +// RUN: %clang_cc1 -emit-llvm -function-alignment 5 %s -o - | FileCheck %s -check-prefix CHECK-32 + +void f(void) {} +void __attribute__((__aligned__(64))) g(void) {} + +// CHECK-NONE-NOT: define {{(dso_local )?}}void @f() #0 align +// CHECK-NONE: define {{(dso_local )?}}void @g() #0 align 64 + +// CHECK-16: define {{(dso_local )?}}void @f() #0 align 16 +// CHECK-16: define {{(dso_local )?}}void @g() #0 align 64 + +// CHECK-32: define {{(dso_local )?}}void @f() #0 align 32 +// CHECK-32: define {{(dso_local )?}}void @g() #0 align 64 + |
