Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / split-stacks.c
blob80fecbe8426da27fd3c6f2e159cc3c4c22c8b8bf
1 // RUN: %clang -target x86_64-linux-gnu -fsplit-stack -S %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-SEGSTK %s
2 // RUN: %clang -target x86_64-linux-gnu -S %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-NOSEGSTK %s
4 int foo(void) {
5 return 0;
8 __attribute__((no_split_stack))
9 int nosplit(void) {
10 return 0;
13 int main(void) {
14 return foo();
17 // CHECK-SEGSTK: define dso_local i32 @foo() [[SS:#[0-9]+]] {
18 // CHECK-SEGSTK: define dso_local i32 @nosplit() [[NSS:#[0-9]+]] {
19 // CHECK-SEGSTK: define dso_local i32 @main() [[SS]] {
20 // CHECK-SEGSTK-NOT: [[NSS]] = { {{.*}} "split-stack" {{.*}} }
21 // CHECK-SEGSTK: [[SS]] = { {{.*}} "split-stack" {{.*}} }
22 // CHECK-SEGSTK-NOT: [[NSS]] = { {{.*}} "split-stack" {{.*}} }
24 // CHECK-NOSEGSTK: define dso_local i32 @foo() #0 {
25 // CHECK-NOSEGSTK: define dso_local i32 @main() #0 {
26 // CHECK-NOSEGSTK-NOT: #0 = { {{.*}} "split-stack" {{.*}} }