1
- // RUN: %clang -gkey-instructions %s -gmlt -gcolumn-info -S -emit-llvm -o - -Wno-unused-variable \
1
+ // RUN: %clang -gkey-instructions -x c++ %s -gmlt -gcolumn-info -S -emit-llvm -o - -Wno-unused-variable \
2
+ // RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
3
+
4
+ // RUN: %clang -gkey-instructions -x c %s -gmlt -gcolumn-info -S -emit-llvm -o - -Wno-unused-variable \
2
5
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
3
6
4
7
unsigned long long g ;
@@ -15,9 +18,17 @@ void fun() {
15
18
// CHECK-NEXT: store i64 %0, ptr @g{{.*}}, !dbg [[G3R1:!.*]]
16
19
// CHECK-NEXT: store i64 %0, ptr @g{{.*}}, !dbg [[G2R1:!.*]]
17
20
g = g = g ;
21
+
22
+ // Compound assignment.
23
+ // CHECK: %1 = load i64, ptr @g
24
+ // CHECK: %add = add i64 %1, 50, !dbg [[G4R2:!.*]]
25
+ // CHECK: store i64 %add, ptr @g{{.*}}, !dbg [[G4R1:!.*]]
26
+ g += 50 ;
18
27
}
19
28
20
29
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
21
30
// CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
22
31
// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
23
32
// CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
33
+ // CHECK: [[G4R2]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 2)
34
+ // CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)
0 commit comments