[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:21:29 PDT 2023


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG99c9515b3708: [libc][obvious] Correctly hoist mask out of the loop (authored by jhuber6).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151232/new/

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.524789.patch
Type: text/x-patch
Size: 673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230523/f4a0063b/attachment.bin>


More information about the libc-commits mailing list