2022-10-07 14:09:44 +02:00
|
|
|
// RUN: %clang_cc1 %s -emit-llvm -o - -fms-extensions -triple i686-pc-win32 | FileCheck %s
|
2013-11-13 22:58:53 +00:00
|
|
|
|
2018-02-23 19:30:48 +00:00
|
|
|
// CHECK-LABEL: define dso_local void @test_alloca(
|
2013-11-13 22:58:53 +00:00
|
|
|
void capture(void *);
|
|
|
|
void test_alloca(int n) {
|
|
|
|
capture(_alloca(n));
|
2016-10-27 17:18:24 +00:00
|
|
|
// CHECK: %[[arg:.*]] = alloca i8, i32 %{{.*}}, align 16
|
2022-10-07 14:09:44 +02:00
|
|
|
// CHECK: call void @capture(ptr noundef %[[arg]])
|
2013-11-13 22:58:53 +00:00
|
|
|
}
|
2016-10-31 05:37:48 +00:00
|
|
|
|
2018-02-23 19:30:48 +00:00
|
|
|
// CHECK-LABEL: define dso_local void @test_alloca_with_align(
|
2016-10-31 05:37:48 +00:00
|
|
|
void test_alloca_with_align(int n) {
|
|
|
|
capture(__builtin_alloca_with_align(n, 64));
|
|
|
|
// CHECK: %[[arg:.*]] = alloca i8, i32 %{{.*}}, align 8
|
2022-10-07 14:09:44 +02:00
|
|
|
// CHECK: call void @capture(ptr noundef %[[arg]])
|
2016-10-31 05:37:48 +00:00
|
|
|
}
|