| 1 |
// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions %s -debug-info-kind=line-tables-only -emit-llvm -o - \ |
| 2 |
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank |
| 3 |
|
| 4 |
// Check assignments to bitfield members are given source atom groups, as this |
| 5 |
// has distinct codegen codepath to other variable/member assignments. |
| 6 |
|
| 7 |
struct S { int a:3; }; |
| 8 |
|
| 9 |
void foo(int x, S s) { |
| 10 |
// CHECK: %bf.set = or i8 %bf.clear, %bf.value, !dbg [[G1R2:!.*]] |
| 11 |
// CHECK: store i8 %bf.set, ptr %s, align 4, !dbg [[G1R1:!.*]] |
| 12 |
s.a = x; |
| 13 |
|
| 14 |
// CHECK: ret{{.*}}, !dbg [[RET:!.*]] |
| 15 |
} |
| 16 |
|
| 17 |
// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2) |
| 18 |
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) |
| 19 |
// CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1) |