[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / dominating-store-to-return.c
blob42595c5296098a96878345bd9cb0645f71ae4d6f
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -opaque-pointers -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix=NO-LIFETIME
3 // RUN: %clang_cc1 -opaque-pointers -O1 -disable-llvm-optzns -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix=LIFETIME
5 // NO-LIFETIME-LABEL: @main(
6 // NO-LIFETIME-NEXT: entry:
7 // NO-LIFETIME-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
8 // NO-LIFETIME-NEXT: [[FOO:%.*]] = alloca i32, align 4
9 // NO-LIFETIME-NEXT: [[FOO2:%.*]] = alloca i32, align 4
10 // NO-LIFETIME-NEXT: store i32 0, ptr [[RETVAL]], align 4
11 // NO-LIFETIME-NEXT: ret i32 0
13 // LIFETIME-LABEL: @main(
14 // LIFETIME-NEXT: entry:
15 // LIFETIME-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
16 // LIFETIME-NEXT: [[FOO:%.*]] = alloca i32, align 4
17 // LIFETIME-NEXT: [[FOO2:%.*]] = alloca i32, align 4
18 // LIFETIME-NEXT: store i32 0, ptr [[RETVAL]], align 4
19 // LIFETIME-NEXT: call void @llvm.lifetime.start.p0(i64 4, ptr [[FOO]]) #[[ATTR2:[0-9]+]]
20 // LIFETIME-NEXT: call void @llvm.lifetime.start.p0(i64 4, ptr [[FOO2]]) #[[ATTR2]]
21 // LIFETIME-NEXT: call void @llvm.lifetime.end.p0(i64 4, ptr [[FOO2]]) #[[ATTR2]]
22 // LIFETIME-NEXT: call void @llvm.lifetime.end.p0(i64 4, ptr [[FOO]]) #[[ATTR2]]
23 // LIFETIME-NEXT: ret i32 0
25 int main() {
26 unsigned foo, foo2;
27 return 0;