[Openmp-commits] [PATCH] D128896: [Libomptarget] Fix bucket selection in MemoryManager.h

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jul 1 13:17:41 PDT 2022


tianshilei1992 accepted this revision.
tianshilei1992 added a comment.
This revision is now accepted and ready to land.

In D128896#3624297 <https://reviews.llvm.org/D128896#3624297>, @protze.joachim wrote:

> In D128896#3623818 <https://reviews.llvm.org/D128896#3623818>, @tianshilei1992 wrote:
>
>> I don't understand. Here we all do `>>` operation. How could it cause overflow?
>
> The function also has `|` (soft addition) and one `+`, which overflows, when you pass 0x8000 0000 to the function. The first few lines propagate the 1 all the way to the right, so that you get 0xFFFF FFFF, adding 1 gives you 0x0.

I see. Yeah, that should be the case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128896



More information about the Openmp-commits mailing list