[Github] Label lldb-dap PRs (#125139)
[llvm-project.git] / clang / test / CodeGen / extend-variable-liveness.c
blobc6bca48e6469c25b94b71f54e8e8f7066bdb0028
1 // RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -emit-llvm -fextend-variable-liveness -o - | FileCheck %s --implicit-check-not=llvm.fake.use
2 // Check that fake use calls are emitted at the correct locations, i.e.
3 // at the end of lexical blocks and at the end of the function.
5 int glob_i;
6 char glob_c;
7 float glob_f;
9 int foo(int i) {
10 // CHECK-LABEL: define{{.*}}foo
11 if (i < 4) {
12 char j = i * 3;
13 if (glob_i > 3) {
14 float f = glob_f;
15 j = f;
16 glob_c = j;
17 // CHECK: call void (...) @llvm.fake.use(float %
18 // CHECK-NEXT: br label %
20 glob_i = j;
21 // CHECK: call void (...) @llvm.fake.use(i8 %
22 // CHECK-NEXT: br label %
24 // CHECK: call void (...) @llvm.fake.use(i32 %
25 // CHECK-NEXT: ret
26 return 4;
29 // CHECK: declare void @llvm.fake.use(...)