Skip to content

Commit 9652d69

Browse files
committed
SWDEV-436099 Use new amdgcn_ballot builtin
Change-Id: I024fabc6c5b3f39c66885eb7615953f4d0432e9a
1 parent 70b2085 commit 9652d69

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

hipamd/include/hip/amd_detail/amd_warp_functions.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,16 @@ int __any(int predicate) {
9999
return __ockl_wfany_i32(predicate);
100100
}
101101

102-
// XXX from llvm/include/llvm/IR/InstrTypes.h
103-
#define ICMP_NE 33
104-
105102
__device__
106103
inline
107104
unsigned long long int __ballot(int predicate) {
108-
return __builtin_amdgcn_uicmp(predicate, 0, ICMP_NE);
105+
return __builtin_amdgcn_ballot_w64(predicate);
109106
}
110107

111108
__device__
112109
inline
113110
unsigned long long int __ballot64(int predicate) {
114-
return __builtin_amdgcn_uicmp(predicate, 0, ICMP_NE);
111+
return __ballot(predicate);
115112
}
116113

117114
// See amd_warp_sync_functions.h for an explanation of this preprocessor flag.

0 commit comments

Comments
 (0)