File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -4973,6 +4973,7 @@ llvm::Value *CodeGenFunction::EmitWithOriginalRHSBitfieldAssignment(
49734973}
49744974
49754975Value *ScalarExprEmitter::VisitBinAssign (const BinaryOperator *E) {
4976+ ApplyAtomGroup Grp (CGF.getDebugInfo ());
49764977 bool Ignore = TestAndClearIgnoreResultAssign ();
49774978
49784979 Value *RHS;
Original file line number Diff line number Diff line change 22// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
33
44unsigned long long g;
5- void fun () { g = 0 ; }
6-
5+ void fun () {
76// CHECK: store i64 0, ptr @g{{.*}}, !dbg [[G1R1:!.*]]
7+ g = 0 ;
8+
9+ // Treat the two assignments as two atoms.
10+ //
11+ // FIXME: Because of the atomGroup implementation the load can only be
12+ // associated with one of the two stores, despite being a good backup
13+ // loction for both.
14+ // CHECK-NEXT: %0 = load i64, ptr @g{{.*}}, !dbg [[G2R2:!.*]]
15+ // CHECK-NEXT: store i64 %0, ptr @g{{.*}}, !dbg [[G3R1:!.*]]
16+ // CHECK-NEXT: store i64 %0, ptr @g{{.*}}, !dbg [[G2R1:!.*]]
17+ g = g = g;
18+ }
819
920// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
21+ // CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
22+ // CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
23+ // CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
You can’t perform that action at this time.
0 commit comments