// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
// RUN: %clang_cc1 -opaque-pointers -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix=NO-LIFETIME
// RUN: %clang_cc1 -opaque-pointers -O1 -disable-llvm-optzns -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix=LIFETIME
// NO-LIFETIME-LABEL: @main(
// NO-LIFETIME-NEXT: entry:
// NO-LIFETIME-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
// NO-LIFETIME-NEXT: [[FOO:%.*]] = alloca i32, align 4
// NO-LIFETIME-NEXT: [[FOO2:%.*]] = alloca i32, align 4
// NO-LIFETIME-NEXT: store i32 0, ptr [[RETVAL]], align 4
// NO-LIFETIME-NEXT: ret i32 0
//
// LIFETIME-LABEL: @main(
// LIFETIME-NEXT: entry:
// LIFETIME-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
// LIFETIME-NEXT: [[FOO:%.*]] = alloca i32, align 4
// LIFETIME-NEXT: [[FOO2:%.*]] = alloca i32, align 4
// LIFETIME-NEXT: store i32 0, ptr [[RETVAL]], align 4
// LIFETIME-NEXT: call void @llvm.lifetime.start.p0(i64 4, ptr [[FOO]]) #[[ATTR2:[0-9]+]]
// LIFETIME-NEXT: call void @llvm.lifetime.start.p0(i64 4, ptr [[FOO2]]) #[[ATTR2]]
// LIFETIME-NEXT: call void @llvm.lifetime.end.p0(i64 4, ptr [[FOO2]]) #[[ATTR2]]
// LIFETIME-NEXT: call void @llvm.lifetime.end.p0(i64 4, ptr [[FOO]]) #[[ATTR2]]
// LIFETIME-NEXT: ret i32 0
//
int