xref: /llvm-project/clang/test/CodeGen/PowerPC/aix_alloca_align.c (revision c5de4dd1eab00df76c1a68c5f397304ceacb71f2)
1 // RUN: %clang_cc1 -triple=powerpc-ibm-aix-xcoff -emit-llvm < %s | \
2 // RUN:   FileCheck --check-prefix=32BIT %s
3 
4 // RUN: %clang_cc1 -triple=powerpc64-ibm-aix-xcoff -emit-llvm < %s | \
5 // RUN:   FileCheck --check-prefix=64BIT %s
6 
7 typedef __SIZE_TYPE__ size_t;
8 extern void *alloca(size_t __size) __attribute__((__nothrow__));
9 
foo(void)10 void foo(void) {
11   char *ptr1 = (char *)alloca(sizeof(char) * 9);
12   char *ptr2 = (char *)alloca(sizeof(char) * 32);
13 }
14 
15 // 32BIT: %0 = alloca i8, i32 9, align 16
16 // 32BIT: %1 = alloca i8, i32 32, align 16
17 
18 // 64BIT: %0 = alloca i8, i64 9, align 16
19 // 64BIT: %1 = alloca i8, i64 32, align 16
20