Debian Codegraph @

clang/test/DebugInfo/KeyInstructions/cast.c

raw
1 // RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -gno-column-info -x c++ %s -debug-info-kind=line-tables-only -emit-llvm -o - \
2 // RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
3
4 // RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -gno-column-info -x c %s -debug-info-kind=line-tables-only -emit-llvm -o - \
5 // RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
6
7 // Check that when a cast is a Key Instruction backup we add its operand
8 // instruction, if there is one, to the source atom too.
9
10 float g;
11 void a() {
12 // CHECK: %0 = load float, ptr @g{{.*}}, !dbg [[G1R3:!.*]]
13 // CHECK: %conv = fptosi float %0 to i32{{.*}}, !dbg [[G1R2:!.*]]
14 // CHECK: store i32 %conv, ptr %a{{.*}}, !dbg [[G1R1:!.*]]
15 int a = g;
16 // CHECK: ret{{.*}}, !dbg [[RET:!.*]]
17 }
18
19 // CHECK: [[G1R3]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 3)
20 // CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
21 // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
22 // CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)