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 \
25// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
36
47unsigned long long g ;
@@ -15,9 +18,17 @@ void fun() {
1518// CHECK-NEXT: store i64 %0, ptr @g{{.*}}, !dbg [[G3R1:!.*]]
1619// CHECK-NEXT: store i64 %0, ptr @g{{.*}}, !dbg [[G2R1:!.*]]
1720 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 ;
1827}
1928
2029// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
2130// CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
2231// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
2332// 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