Skip to content

Commit 00b9b6d

Browse files
authored
[SYCL][ESIMD][ABI Break] Remove predec atomic op (#14480)
It never worked, VC doesn't support it, and nobody has ever reported it broken so there's no use in emulating it. Signed-off-by: Sarnie, Nick <[email protected]>
1 parent db4d83e commit 00b9b6d

File tree

8 files changed

+0
-19
lines changed

8 files changed

+0
-19
lines changed

llvm/lib/SYCLLowerIR/ESIMD/LowerESIMD.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -908,9 +908,6 @@ static std::string getESIMDIntrinSuffix(id::FunctionEncoding *FE,
908908
case 0x14:
909909
Suff = ".fsub";
910910
break;
911-
case 0xff:
912-
Suff = ".predec";
913-
break;
914911
default:
915912
llvm_unreachable("unknown atomic OP");
916913
};

sycl/include/sycl/ext/intel/esimd/common.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,6 @@ enum class atomic_op : uint8_t {
198198
fsub = 0x14,
199199
load = 0x15,
200200
store = 0x16,
201-
/// Decrement: <code>*addr = *addr - 1</code>. The only operation which
202-
/// returns new value of the destination rather than old.
203-
predec = 0xff,
204201
};
205202

206203
#undef __ESIMD_USM_DWORD_TO_LSC_MSG
@@ -211,7 +208,6 @@ namespace detail {
211208
template <__ESIMD_NS::atomic_op Op> constexpr bool has_lsc_equivalent() {
212209
switch (Op) {
213210
case __ESIMD_NS::atomic_op::xchg:
214-
case __ESIMD_NS::atomic_op::predec:
215211
return false;
216212
default:
217213
return true;
@@ -315,7 +311,6 @@ template <__ESIMD_NS::atomic_op Op> constexpr int get_num_args() {
315311
case __ESIMD_NS::atomic_op::load:
316312
return 0;
317313
case __ESIMD_NS::atomic_op::xchg:
318-
case __ESIMD_NS::atomic_op::predec:
319314
case __ESIMD_NS::atomic_op::store:
320315
case __ESIMD_NS::atomic_op::add:
321316
case __ESIMD_NS::atomic_op::sub:

sycl/include/sycl/ext/intel/esimd/memory.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5606,7 +5606,6 @@ constexpr void check_atomic() {
56065606

56075607
if constexpr (Op == __ESIMD_NS::atomic_op::xchg ||
56085608
Op == __ESIMD_NS::atomic_op::cmpxchg ||
5609-
Op == __ESIMD_NS::atomic_op::predec ||
56105609
Op == __ESIMD_NS::atomic_op::inc ||
56115610
Op == __ESIMD_NS::atomic_op::dec) {
56125611

sycl/test-e2e/ESIMD/lsc/atomic_smoke.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ const char *to_string(DWORDAtomicOp op) {
120120
return "load";
121121
case DWORDAtomicOp::store:
122122
return "store";
123-
case DWORDAtomicOp::predec:
124-
return "predec";
125123
}
126124
return "<unknown>";
127125
}

sycl/test-e2e/ESIMD/lsc/local_accessor_atomic_smoke.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ const char *to_string(DWORDAtomicOp op) {
8787
return "load";
8888
case DWORDAtomicOp::store:
8989
return "store";
90-
case DWORDAtomicOp::predec:
91-
return "predec";
9290
}
9391
return "<unknown>";
9492
}

sycl/test-e2e/ESIMD/lsc/lsc_slm_atomic_smoke.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ template <class, int, template <class, int> class> class TestID;
3737

3838
const char *to_string(LSCAtomicOp op) {
3939
switch (op) {
40-
case LSCAtomicOp::predec:
41-
return "lsc::predec";
4240
case LSCAtomicOp::add:
4341
return "lsc::add";
4442
case LSCAtomicOp::sub:

sycl/test-e2e/ESIMD/unified_memory_api/Inputs/atomic_update.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ const char *to_string(atomic_op op) {
8282
return "load";
8383
case atomic_op::store:
8484
return "store";
85-
case atomic_op::predec:
86-
return "predec";
8785
}
8886
return "<unknown>";
8987
}

sycl/test-e2e/ESIMD/unified_memory_api/Inputs/atomic_update_slm.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ const char *to_string(atomic_op op) {
6565
return "load";
6666
case atomic_op::store:
6767
return "store";
68-
case atomic_op::predec:
69-
return "predec";
7068
}
7169
return "<unknown>";
7270
}

0 commit comments

Comments
 (0)