Skip to content

Commit b87662f

Browse files
authored
Drop old workaround (llvm#3449)
2 parents 5d17b6e + 6babb25 commit b87662f

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

amd/device-libs/ockl/src/wfaas.cl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,21 @@
1010

1111
#define ATTR __attribute__((always_inline))
1212

13-
// Hack to prevent incorrect hoisting of the operation. There
14-
// currently is no proper way in llvm to prevent hoisting of
15-
// operations control flow dependent results.
16-
ATTR
17-
static int optimizationBarrierHack(int in_val)
18-
{
19-
int out_val;
20-
__asm__ volatile ("" : "=v"(out_val) : "0"(in_val));
21-
return out_val;
22-
}
23-
2413
ATTR bool
2514
OCKL_MANGLE_I32(wfany)(int e)
2615
{
27-
e = optimizationBarrierHack(e);
2816
return __builtin_amdgcn_ballot_w64(e) != 0;
2917
}
3018

3119
ATTR bool
3220
OCKL_MANGLE_I32(wfall)(int e)
3321
{
34-
e = optimizationBarrierHack(e);
3522
return __builtin_amdgcn_ballot_w64(e) == __builtin_amdgcn_read_exec();
3623
}
3724

3825
ATTR bool
3926
OCKL_MANGLE_I32(wfsame)(int e)
4027
{
41-
e = optimizationBarrierHack(e);
4228
ulong u = __builtin_amdgcn_ballot_w64(e);
4329
return (u == 0UL) | (u == __builtin_amdgcn_read_exec());
4430
}

0 commit comments

Comments
 (0)