| 1 |
// RUN: %clang_cc1 %s -emit-llvm -o - -fms-extensions -triple i686-pc-win32 | FileCheck %s |
| 2 |
|
| 3 |
// CHECK-LABEL: define dso_local void @test_alloca( |
| 4 |
void capture(void *); |
| 5 |
void test_alloca(int n) { |
| 6 |
capture(_alloca(n)); |
| 7 |
// CHECK: %[[arg:.*]] = alloca i8, i32 %{{.*}}, align 16 |
| 8 |
// CHECK: call void @capture(ptr noundef %[[arg]]) |
| 9 |
} |
| 10 |
|
| 11 |
// CHECK-LABEL: define dso_local void @test_alloca_with_align( |
| 12 |
void test_alloca_with_align(int n) { |
| 13 |
capture(__builtin_alloca_with_align(n, 64)); |
| 14 |
// CHECK: %[[arg:.*]] = alloca i8, i32 %{{.*}}, align 8 |
| 15 |
// CHECK: call void @capture(ptr noundef %[[arg]]) |
| 16 |
} |