| 1 |
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir |
| 2 |
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR |
| 3 |
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll |
| 4 |
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM |
| 5 |
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll |
| 6 |
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG |
| 7 |
|
| 8 |
__attribute((aligned(32))) float a[128]; |
| 9 |
union {int a[4]; __attribute((aligned(32))) float b[4];} b; |
| 10 |
|
| 11 |
// CIR: @a = #cir.zero {{.*}}alignment = 32 |
| 12 |
// CIR: @b = #cir.zero{{.*}}alignment = 32 |
| 13 |
|
| 14 |
// LLVM: @a = {{.*}}zeroinitializer, align 32 |
| 15 |
// LLVM: @b = {{.*}}zeroinitializer, align 32 |
| 16 |
|
| 17 |
// OGCG: @a = {{.*}}zeroinitializer, align 32 |
| 18 |
// OGCG: @b = {{.*}}zeroinitializer, align 32 |
| 19 |
|
| 20 |
long long int test5[1024]; |
| 21 |
// CIR: @test5 = #cir.zero {{.*}}alignment = 16 |
| 22 |
// LLVM: @test5 = {{.*}}global [1024 x i64] zeroinitializer, align 16 |
| 23 |
// OGCG: @test5 = {{.*}}global [1024 x i64] zeroinitializer, align 16 |
| 24 |
|
| 25 |
// TODO: Add more test cases from clang/test/CodeGen/alignment.c when we have |
| 26 |
// implemented compound literal expression support. |