Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / alloca-align.cpp
blob45ca1f1fde5b876610b487558271695ad68a1668
1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
3 struct s0 {
4 int Start, End;
5 unsigned Alignment;
6 int TheStores __attribute__((aligned(16)));
7 };
9 // CHECK-LABEL: define{{.*}} void @f0
10 // CHECK: alloca %struct.s0, align 16
11 extern "C" void f0() {
12 (void) s0();
15 // CHECK-LABEL: define{{.*}} void @f1
16 // CHECK: alloca %struct.s0, align 16
17 extern "C" void f1() {
18 (void) (struct s0) { 0, 0, 0, 0 };
21 // CHECK-LABEL: define{{.*}} i32 @f2
22 // CHECK: alloca %struct.s1, align 2
23 struct s1 { short x; short y; };
24 extern "C" struct s1 f2(int a, struct s1 *x, struct s1 *y) {
25 if (a)
26 return *x;
27 return *y;