Skip to content

Commit cd7df2f

Browse files
committed
Remove "private", use O0 in tests
1 parent 5fe2210 commit cd7df2f

File tree

6 files changed

+434
-1230
lines changed

6 files changed

+434
-1230
lines changed

clang/docs/LanguageExtensions.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4425,11 +4425,10 @@ __builtin_amdgcn_fence
44254425
* ``const char *`` synchronization scope, e.g. ``workgroup``
44264426
* Zero or more ``const char *`` address spaces names.
44274427
4428-
The address spaces arguments must be string literals with known values, such as:
4428+
The address spaces arguments must be one of the following string literals:
44294429
44304430
* ``"local"``
44314431
* ``"global"``
4432-
* ``"image"``
44334432
44344433
If one or more address space name are provided, the code generator will attempt
44354434
to emit potentially faster instructions that order access to at least those

clang/test/CodeGenCXX/builtin-amdgcn-fence.cpp

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,40 +74,38 @@ void test_global() {
7474
// CHECK-LABEL: define dso_local void @_Z10test_imagev(
7575
// CHECK-SAME: ) #[[ATTR0]] {
7676
// CHECK-NEXT: entry:
77-
// CHECK-NEXT: fence syncscope("workgroup") seq_cst, !mmra [[META5:![0-9]+]]
78-
// CHECK-NEXT: fence syncscope("agent") acquire, !mmra [[META5]]
79-
// CHECK-NEXT: fence seq_cst, !mmra [[META5]]
80-
// CHECK-NEXT: fence syncscope("agent") acq_rel, !mmra [[META5]]
81-
// CHECK-NEXT: fence syncscope("workgroup") release, !mmra [[META5]]
77+
// CHECK-NEXT: fence syncscope("workgroup") seq_cst, !mmra [[META3]]
78+
// CHECK-NEXT: fence syncscope("agent") acquire, !mmra [[META3]]
79+
// CHECK-NEXT: fence seq_cst, !mmra [[META3]]
80+
// CHECK-NEXT: fence syncscope("agent") acq_rel, !mmra [[META3]]
81+
// CHECK-NEXT: fence syncscope("workgroup") release, !mmra [[META3]]
8282
// CHECK-NEXT: ret void
8383
//
8484
void test_image() {
85-
__builtin_amdgcn_fence( __ATOMIC_SEQ_CST, "workgroup", "image");
85+
__builtin_amdgcn_fence( __ATOMIC_SEQ_CST, "workgroup", "local");
8686

87-
__builtin_amdgcn_fence(__ATOMIC_ACQUIRE, "agent", "image");
87+
__builtin_amdgcn_fence(__ATOMIC_ACQUIRE, "agent", "local");
8888

89-
__builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "", "image");
89+
__builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "", "local");
9090

91-
__builtin_amdgcn_fence(4, "agent", "image");
91+
__builtin_amdgcn_fence(4, "agent", "local");
9292

93-
__builtin_amdgcn_fence(3, "workgroup", "image");
93+
__builtin_amdgcn_fence(3, "workgroup", "local");
9494
}
9595

9696
// CHECK-LABEL: define dso_local void @_Z10test_mixedv(
9797
// CHECK-SAME: ) #[[ATTR0]] {
9898
// CHECK-NEXT: entry:
99-
// CHECK-NEXT: fence syncscope("workgroup") seq_cst, !mmra [[META6:![0-9]+]]
100-
// CHECK-NEXT: fence syncscope("workgroup") seq_cst, !mmra [[META7:![0-9]+]]
99+
// CHECK-NEXT: fence syncscope("workgroup") seq_cst, !mmra [[META5:![0-9]+]]
100+
// CHECK-NEXT: fence syncscope("workgroup") seq_cst, !mmra [[META5]]
101101
// CHECK-NEXT: ret void
102102
//
103103
void test_mixed() {
104-
__builtin_amdgcn_fence( __ATOMIC_SEQ_CST, "workgroup", "image", "global");
105-
__builtin_amdgcn_fence( __ATOMIC_SEQ_CST, "workgroup", "image", "local", "global", "image", "image");
104+
__builtin_amdgcn_fence( __ATOMIC_SEQ_CST, "workgroup", "local", "global");
105+
__builtin_amdgcn_fence( __ATOMIC_SEQ_CST, "workgroup", "local", "local", "global", "local", "local");
106106
}
107107
//.
108108
// CHECK: [[META3]] = !{!"amdgpu-as", !"local"}
109109
// CHECK: [[META4]] = !{!"amdgpu-as", !"global"}
110-
// CHECK: [[META5]] = !{!"amdgpu-as", !"image"}
111-
// CHECK: [[META6]] = !{[[META4]], [[META5]]}
112-
// CHECK: [[META7]] = !{[[META4]], [[META5]], [[META3]]}
110+
// CHECK: [[META5]] = !{[[META4]], [[META3]]}
113111
//.

llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,6 @@ class SIMemoryLegalizer final : public MachineFunctionPass {
683683
static const StringMap<SIAtomicAddrSpace> ASNames = {{
684684
{"global", SIAtomicAddrSpace::GLOBAL},
685685
{"local", SIAtomicAddrSpace::LDS},
686-
{"image", SIAtomicAddrSpace::SCRATCH},
687686
}};
688687

689688
void diagnoseUnknownMMRAASName(const MachineInstr &MI, StringRef AS) {

0 commit comments

Comments
 (0)