[libc-commits] [PATCH] D151232: [libc][obvious] Correctly hoist mask out of the loop
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue May 23 10:20:42 PDT 2023
jhuber6 created this revision.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.
Summry:
This was accidentally dropped from a previous patch following a rebase.
Fix it to where it's consistent.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151232
Files:
libc/src/__support/RPC/rpc.h
Index: libc/src/__support/RPC/rpc.h
===================================================================
--- libc/src/__support/RPC/rpc.h
+++ libc/src/__support/RPC/rpc.h
@@ -443,7 +443,8 @@
inline_memcpy(&buffer->data[1], lane_value(src, id), len);
});
uint64_t idx = sizeof(Buffer::data) - sizeof(uint64_t);
- while (gpu::ballot(process.get_packet(index).header.mask, idx < num_sends)) {
+ uint64_t mask = process.get_packet(index).header.mask;
+ while (gpu::ballot(mask, idx < num_sends)) {
send([=](Buffer *buffer, uint32_t id) {
uint64_t len = lane_value(size, id) - idx > sizeof(Buffer::data)
? sizeof(Buffer::data)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151232.524788.patch
Type: text/x-patch
Size: 673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230523/5eb9e4ec/attachment.bin>
More information about the libc-commits
mailing list