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

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jul 1 00:19:23 PDT 2022


protze.joachim added a comment.

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.


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