File tree Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Original file line number Diff line number Diff line change 10
10
11
11
#define ATTR __attribute__((always_inline))
12
12
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
-
24
13
ATTR bool
25
14
OCKL_MANGLE_I32 (wfany )(int e )
26
15
{
27
- e = optimizationBarrierHack (e );
28
16
return __builtin_amdgcn_ballot_w64 (e ) != 0 ;
29
17
}
30
18
31
19
ATTR bool
32
20
OCKL_MANGLE_I32 (wfall )(int e )
33
21
{
34
- e = optimizationBarrierHack (e );
35
22
return __builtin_amdgcn_ballot_w64 (e ) == __builtin_amdgcn_read_exec ();
36
23
}
37
24
38
25
ATTR bool
39
26
OCKL_MANGLE_I32 (wfsame )(int e )
40
27
{
41
- e = optimizationBarrierHack (e );
42
28
ulong u = __builtin_amdgcn_ballot_w64 (e );
43
29
return (u == 0UL ) | (u == __builtin_amdgcn_read_exec ());
44
30
}
You can’t perform that action at this time.
0 commit comments