Debian Codegraph @

clang/test/CodeGen/PowerPC/aix-vector-attr-aligned.c

raw
1 // REQUIRES: powerpc-registered-target
2 // RUN: %clang_cc1 -triple powerpc-unknown-aix -target-feature +altivec -target-cpu pwr7 -emit-llvm -o - %s | \
3 // RUN: FileCheck %s
4 // RUN: %clang_cc1 -triple powerpc64-unknown-aix -target-feature +altivec -target-cpu pwr7 -emit-llvm -o - %s | \
5 // RUN: FileCheck %s
6
7 typedef vector int __attribute__((aligned(8))) UnderAlignedVI;
8
9 vector int g32 __attribute__((aligned(32)));
10 vector int g8 __attribute__((aligned(8)));
11 UnderAlignedVI TypedefedGlobal;
12
13 int escape(vector int*);
14
15 int local32(void) {
16 vector int l32 __attribute__((aligned(32)));
17 return escape(&l32);
18 }
19
20 int local8(void) {
21 vector int l8 __attribute__((aligned(8)));
22 return escape(&l8);
23 }
24
25 // CHECK: @g32 = global <4 x i32> zeroinitializer, align 32
26 // CHECK: @g8 = global <4 x i32> zeroinitializer, align 16
27 // CHECK: @TypedefedGlobal = global <4 x i32> zeroinitializer, align 8
28
29 // CHECK-LABEL: @local32
30 // CHECK: %l32 = alloca <4 x i32>, align 32
31 //
32 // CHECK-LABEL: @local8
33 // CHECK: %l8 = alloca <4 x i32>, align 16